LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-10-2007, 07:22 AM   #1
Albin Joseph
LQ Newbie
 
Registered: Jan 2007
Posts: 4

Rep: Reputation: 0
Setting permissions


Hi

I have created a new user say abc. His dome directtory is /home/abc. I need to restrict this user from accessing any directories other than one inside /home/abc. He should be able to view, edit, delete, write all the files and directories inside /home/abc. But he should not be able to list, or access any files or directories outside /home/abc. How can I achive this. Please help me.

Thanks
Albin
 
Old 05-10-2007, 07:45 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
You should look at setting up a chroot "jail" for the user.

Type "man chroot" for more information. Many tutorials exist for setting up jails.
 
Old 05-10-2007, 07:55 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
I am not familiar with the chroot method described above.

Do you want the user to be able to run system SW and utilities? If so, then he/she needs read and execute status to places like /bin /sbin and /usr. Please describe in more detail what you are trying to accomplish.
 
Old 05-10-2007, 08:15 AM   #4
Albin Joseph
LQ Newbie
 
Registered: Jan 2007
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jlightner
You should look at setting up a chroot "jail" for the user.
let me do a search on that.

Quote:
Originally Posted by pixellany
Do you want the user to be able to run system SW and utilities? If so, then he/she needs read and execute status to places like /bin /sbin and /usr. Please describe in more detail what you are trying to accomplish.
Ofcourse he should be able to run the system SW and utilities. What I mean is that he should not be able to read other users data.

Thanks to all
Albin
 
Old 05-10-2007, 08:20 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
The chroot method involves creating a filesystem hierarchy inside the jail. So you could have to copy many of the programs in /bin, /usr/, /etc, etc for that user to be able to function. If that user will be using a gui environment, then there will be a lot of packages to install to the chroot'ed directory. It would be better if you make sure that the other users' home directories don't have the "o"ther bits set, and that the new user isn't a member of the group of any of the users.

If you have a directory that you mount for your own use, then make sure you are the owner and group owner of the file and use "rwx------". For fat32 and ntfs filesystems, you can use the "uid=<your-username>,gid=<your-primary-group>,fmask=0177,dmask=0077" options. This will give you exclusive control.
 
Old 05-10-2007, 08:46 AM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by Albin Joseph
Ofcourse he should be able to run the system SW and utilities. What I mean is that he should not be able to read other users data.
Albin
chmod -R g-r,o-r /home (turns off read access for all of /home for everyone except the owner of the file/directory---and of course the root user)

It's worth studying man chmod and man chown and trying experiments---there is unlimited power and flexibility.
 
Old 05-11-2007, 12:40 AM   #7
Albin Joseph
LQ Newbie
 
Registered: Jan 2007
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks to all
 
  


Reply


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
Setting permissions once and for all? zener Linux - Newbie 3 04-05-2006 05:01 AM
Setting permissions sammckee Linux - Newbie 9 09-18-2003 05:01 PM
setting permissions Tigger Linux - Security 1 06-09-2003 09:20 AM
Setting Permissions johnnyde Linux - Newbie 1 05-22-2003 04:37 PM
Setting Permissions mythology Slackware 2 12-11-2002 02:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:46 PM.

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