-   Linux - Security (
-   -   Jailing a user to a specific folder ONLY (

GUIPenguin 09-22-2005 12:54 PM

Jailing a user to a specific folder ONLY
Lets say I have a user John, and He owns a specific folder on the server. Is there a way to keep him 'jailed' to this folder ONLY? That includes not being able to cd / or anywhere outside this folder. It would be like how the /root folder is for a normal user. They cant enter it, but all files and folders for this 'jailed' user would be simular. Hard to explain but I hope you get what I mean. Thanks alot.

spooon 09-22-2005 01:29 PM

search for "chroot"

vimal 09-23-2005 05:25 AM

Hi GUIPenguin,
A really thoughtful question that was. You can set access restrictions with ACL or Access Control List, just the way you mentioned. The documentation will be available online.

SkyEye 09-23-2005 06:16 AM

Jailing is a concept usually associated with "chroot" command under Linux. By this one can ipmlement a Jail where the insiders would consider them as "/"

For example think you log in to a shell and now you are in the directory "/home/guip". Then you issue this command

chroot /home/guip

After this for that shell login (until you logout) "/" directory would be "/home/guip". So if u do "cd /" you would actually be changed to "/home/guip". Hierarchy would be relative to that point.

Your actual requirement needs more work. But I think there are ways it could be done.

All times are GMT -5. The time now is 12:16 PM.