Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'set 'root' for users to their home?' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
set 'root' for users to their home?
Authored by: saint.duo on Apr 20, '01 06:52:15PM

I know that some UNIX ftp servers allow you to set a user's 'root' to any directory, effectively making it so that they cannot go higher in the directory tree than that point. Setting this to a user's home directory for ftp access would keep them from getting anywhere else on the system. I can't find the config files for the ftp services built into X to see if this can be done, so I'm asking if anyone else might know where to look. Or if this sparks someone's memory, it'd be great.



[ Reply to This | # ]
chroot looks like what you need
Authored by: Anonymous on Apr 21, '01 05:29:08PM

chroot is a command-line tool to change a user's root directory to any directory you want. I'm not sure how it would conflict with existing users and access through non-FTP protocols. I'd suggest making an 'anonymous' user (set up however you would do so with FTP), then chroot them to a secured directory, or to their home.<br>
I believe standard procedure is to put a readme file, etc/, and pub/ in the anon ftp root. A readme file is a readme file. etc/ is a directory with, I'm not sure what, some stuff that's not what you'd download (other readmes), and put the real download stuff into the pub/ dir. DON'T confuse these with /pub and /etc. (/etc is not something you want anonymous access to, even read-only).



[ Reply to This | # ]