Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FTP

Status
Not open for further replies.

RedHatter

Technical User
Dec 5, 2001
7
IE
Is there a way of specifying a ftp users directory, instead of their home directory? And also to stop them from leaving/seeing anything outside of that?
Running redhat6.2 and inetd.
 
One way is to edit /etc/passwd and edit the home directory in there ie. for Bob:

bob:x:511:511::/home/bob/./:/etc/ftponly

The /./ at the end of the home dir path is called the chroot syntax and stops bob going any higher than his home dir.

The /etc/ftponly is only required if you don't want the user to have shell access. It is a text file that tells him off for attempting to get in via a shell (you must add this to /etc/shells if you adopt this approach)

Hope that helped

--
Scott
 
I tried this on a solaris box running proftp and it did not work ? I was able to get to the root folder ?

Any suggestions

-Danny






 
Proftpd uses proftpd.conf and has it's own config syntax,
ala apache.

It is very flexible and you can easily configure a users
environment.

RTFM;-)
 
There was a conflicting directive in my proftpd.conf file

However the chroot /./ syntax was needed in the /etc/passwd file.

no worries

whats up with "RTFM"



-Danny






 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top