Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 11-20-2005, 03:44 AM   #1
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
user/group permissions

is it possible to give one user of a group one kind of permission and the other user of the same group some other type of permission ( for a directory) for example say there's a group called GROUP-A and this group has two users say USER-A and USER-B. now is it possible to give say USER-A read-write-execute permission over a directory and USER-B only read-execute permissions?
Old 11-20-2005, 04:25 AM   #2
blue penguin
LQ Newbie
Registered: Dec 2004
Location: New Zealand
Distribution: Debian GNU/Linux (Etch) GRUB, Kubuntu 5.10 GRUB/GNU/Linux
Posts: 27

Rep: Reputation: 15
If there are just two users in the group you can just make one of them the owner of the directory.

USER-A@linuxbox:~$ mkdir test
USER-A@linuxbox:~$ chown USER-A:GROUP-A test
USER-A@linuxbox:~$ chmod u=rwx,g=rx,o-rwx test
USER-A owns the test directory as a member of GROUP-A. The (u)ser who owns the directory (USER-A) has (r)ead, (w)rite and e(x)ecute permissions. Anyone in the (g)roup who owns the directory (GROUP-A) has just (r)ead, and e(x)ecute permissions. All (o)thers have no permissions.

The man pages may give you some more information about the commands I've used above. The more you read man pages the easier they become to understand. :-)

I hope that helps
- Jessica
Old 11-20-2005, 04:55 AM   #3
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Original Poster
Rep: Reputation: 32
i gave the two user scenario just for simplicity's sake. actually there are 8 users in that group and 3 of them must have rwx permission while the rest of them (5 users) should have rx permissions only!!
Old 11-20-2005, 11:42 PM   #4
Senior Member
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
You might want to consider ACLs if you want very 'granular' permissions like this.
Have a look at some of these HOWTOs:

On most distros it should be a simple process:
1) Install the acl package with your distro's package manager (yum, apt, urpmi, yast, whatever)
2) Remount the partitions in question with the acl option (see those howtos). I'm not sure how good ACL support is for xfs and jfs?

Its fairly unlikely but on some distros you might need to recompile your kernel to get ACL support. You can check if you do by looking in the file /boot/config and seeing if 'CONFIG_EXT3_FS_POSIX_ACL', 'CONFIG_EXT2_FS_POSIX_ACL' and 'CONFIG_REISERFS_FS_POSIX_ACL' are set to y.
Old 11-20-2005, 11:49 PM   #5
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Original Poster
Rep: Reputation: 32
its all right i found the answer. here's how i did it.
1. edit your /etc/fstab file and add acl after the word defaults separated by a comma to the line that contains the filesystem you wish.
mine looks like this->
/dev/hda1 /home ext3 defaults,acl 1 2
2. writequit the editor
3. remount filesystem
mount -o remount filesystem
eg: mount -o remount /home
3. setfacl -m u:usernameermissions directory/filename
eg: setfacl -m u:xyz:rx egdirectory
4. getfacl directoryname to see the results.

this worked for me RHEL4 but i have found out rh8 doesn't supports this. i dunno about others.

Last edited by prozac; 11-20-2005 at 11:54 PM.


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 to set the permissions for a user Group? Akhran Linux - Newbie 6 11-14-2005 07:55 AM
User, Group permissions in Redhat Linux ES 3.0 majicrobot Linux - Security 1 09-25-2004 07:24 AM
user/group permissions for /var/www/html/ illtbagu Linux - Software 6 11-12-2003 05:29 AM
user and group ids - individual permissions? LooseCanon Linux - General 2 09-14-2003 12:57 PM
user/group permissions Diane Welch Linux - Newbie 3 05-08-2001 07:03 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:55 PM.

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