Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 09-22-2005, 01:54 PM   #1
Registered: Aug 2004
Location: Maine
Distribution: Gentoo Linux
Posts: 239

Rep: Reputation: 30
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.
Old 09-22-2005, 02:29 PM   #2
Senior Member
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 49
search for "chroot"
Old 09-23-2005, 06:25 AM   #3
Red Hat India
Registered: Nov 2004
Location: Kerala/Pune,india
Distribution: RedHat, Fedora
Posts: 260

Rep: Reputation: 34
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.
Old 09-23-2005, 07:16 AM   #4
Registered: Sep 2005
Location: Sri Lanka
Distribution: Fedora (workstations), CentOS (servers), Arch, Mint, Ubuntu, and a few more.
Posts: 441

Rep: Reputation: 40
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.

Last edited by SkyEye; 09-23-2005 at 07:18 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I FTP into specific folder hrp2171 Slackware 3 10-18-2004 08:30 PM
Jailing an user SiLiCoN Linux - General 4 10-09-2004 05:49 AM
user jailing ? SiLiCoN Linux - Security 3 10-09-2004 03:20 AM
howto folder/file sharing with specific groups kmhui Linux - Newbie 5 09-18-2004 08:05 PM
domain pointing to a specific folder dominant Linux - Software 3 01-28-2004 03:49 AM

All times are GMT -5. The time now is 06:14 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration