Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 03-12-2007, 07:57 AM   #1
LQ Newbie
Registered: Apr 2005
Location: Hong Kong
Distribution: CentOS 5.3
Posts: 9

Rep: Reputation: 0
Setting multiple group permission

HI, I am a newbie on Linux.
I would like to set a multiple group permission.

For example:
There is a directory /home/notes
"student" is grouped as read-only for this directory, while "teacher" is another group that can read+write in this directory.

Do you have any suggestion? Thank you.
Old 03-12-2007, 08:13 AM   #2
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
A directory or file is assigned one owner and one group. The permissions are individually settable for owner, group, and other.

One easy way is for you to be the owner of the directory, assign "teachers" as the group, and let students be "other"

chown to set the owner and group
chmod to set the permissions

assign users to the "teachers" group using usermod

Look at the man pages for these commands for all the details--eg "man chmod"
Old 03-12-2007, 08:26 AM   #3
Senior Member
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
If your system supports it I would recommend using access control lists instead of just normal permissions. This can allow you to set specific permissions for individual users and groups.

See man getfacl and man setfacl for information on how to set this up.
Old 03-12-2007, 11:42 AM   #4
LQ Newbie
Registered: Apr 2005
Location: Hong Kong
Distribution: CentOS 5.3
Posts: 9

Original Poster
Rep: Reputation: 0
Thank you! I used getfacl and setfacl to set the ACL and it worked!


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
group permission problems ichi Linux - General 6 08-10-2006 11:29 AM
Multiple file/group permission questions JustinCoyan Slackware 3 04-19-2005 10:26 PM
group permission probs wheaties_box Linux - Security 15 08-20-2003 11:46 AM
Group permission klod Linux - Security 2 07-03-2003 07:08 PM
weird group permission... lp? WeNdeL Linux - Newbie 5 01-21-2003 06:29 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:53 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