LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Permissions: giving specific groups write access to a directory (https://www.linuxquestions.org/questions/linux-general-1/permissions-giving-specific-groups-write-access-to-a-directory-461438/)

kinetik 07-06-2006 05:06 AM

Permissions: giving specific groups write access to a directory
 
Hi again friends


I have a directory, let's call it /directory.

I want to give the group root and the group users12 write permission to this directory and everyone else rx permissions.

I know how to assign a directory to a group, and how to change the permissions on that directory, but I have no idea how to assign write permissions to more than one group...


Here's what I've tried:

chmod 775 /directory


That would give it owner:rwx group:rwx other:-rx permissions right?

Where to from there?

ADDED:

Mmm, just saw something interesting. Something about creating a new group, assigning the root and user12 group to this new group, and making the new group the owner of the directory...

Isn't there some other way to do this though?

pixellany 07-06-2006 08:18 AM

In fedora core 5, the GUI users and groups utility will not let you add a group to a group. I don't know if this is intrinsically possible using the CLI. BUT--why have this complexity? Why not just create a group with the right members?

jschiwal 07-06-2006 08:24 AM

Since root would have write access to /directory anyway, you could make user12 the group owner of the directory.
If you want to have select users and groups have write access then use an access control list with the command "setfacl".

kinetik 07-06-2006 08:30 AM

Thanks pixellany and jschiwal, think you two provided me with the answers I needed.

You're both excellent! :)


All times are GMT -5. The time now is 02:21 AM.