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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

chroot command

Status
Not open for further replies.

dustervoice

Technical User
Apr 2, 2009
56
0
0
GB
I have six users (u1, u2 ....u6) and i want to "jail" those users to a directory call jailhouse. what is syntax to accomplish this. this is what im typing but its not working. chroot u1 u2 ...u6 /home/jailhouse
 
chroot runs a command with different root directory. So it changes the / directory to a different dir.

What is exactly that you are trying to prevent?
If you want to prevent users from going around the filesystem while connecting via ftp you may look at configuring the ftp server properly.

For example using vsftpd you can add the line below in vsftpd.conf to jail users in their ftp homes (which are also the users' homedirs)
Code:
chroot_local_user=YES


Instead, creating a chrooted shell for your users is no trivial task. you need to recreate copies of vital dirs in the user's homedir otherwise programs will malfunction. for example, even a normal "ls -l" command will need /bin to run. if a user is jailed in his home, that will not work.
QatQat


If I could have sex each time I reboot my server, I would definitely prefer Windoz over Linux!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top