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)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.