LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices



Reply
 
Search this Thread
Old 03-12-2007, 08:57 AM   #1
terryyip
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, 09:13 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729
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, 09:26 AM   #3
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 66
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, 12:42 PM   #4
terryyip
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!
 
  


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


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


All times are GMT -5. The time now is 11:48 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration