LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Group Permissions on a file or share (http://www.linuxquestions.org/questions/linux-newbie-8/group-permissions-on-a-file-or-share-762610/)

scucci 10-17-2009 01:39 PM

Group Permissions on a file or share
 
Hello,

I'm studying Linux and just started reading about permissions and ownership. My question is how would you have multiple users or groups given access to a certain directory? When doing an ls -l I see the owner, group and others that have permissions that have access to the file or directory. But what if I need multiple different groups access to a particular file or directory all with different permissions?

Thanks.

lutusp 10-17-2009 02:44 PM

Quote:

Originally Posted by scucci (Post 3722889)
But what if I need multiple different groups access to a particular file or directory all with different permissions?

Thanks.

Do you mean users with different permissions, or a directory with different permissions?

If you have a number of different people, all of whom need access to a particular directory but that have nothing else in common:

1. Create a new group for this role.

2. Change the group ownership of the target directory to the new group.

3. For each user that needs access to the directory, make them members of the new group.

themanwhowas 10-17-2009 03:10 PM

Have you looked into ACL's? an ACL allows permissions for multiple users/groups on specific files/folders. I believe this is what you want?

http://linux.die.net/man/1/setfacl


All times are GMT -5. The time now is 05:28 PM.