Mike Leone via plug on 28 Aug 2026 09:54:08 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] Need to have multiple groups with different access to a directory


OK, so there's something I don't know how to do in Linux.

I have this directory structure

/addresses/esri

Now, "esri" is a user account, and /addressess/esri is their home folder. All good.
But I have (or will need to have) 2 other groups with access into /addressess/esri:

AddressCollector needs g+rwx (yes, it's mixed case, I like mixed case, so sue me LOL)
AddressReader needs g+r

(Reason: one of my devs will need to be able to access the files in /addresses/esri, and be able to modify and delete them, and hence be in a group "AddressCollector". But another user needs to only be able to read them, not modify or delete them, and so that guy will be in a group "AddressRead").

I'm familiar with, and have used 

chgrp AddressCollector /addressess/esri
chmod g+rwx  /addressess/esri

And then any user in the "AddressCollector" group (such as my dev) can have their wicked way with any files in that directory structure.

But I've not had to add a 2nd group access to a directory structure. I'm just unsure how. 

I know I don't want chgrp, as that changes group ownership. I don't want to change group ownership, I want both groups to have access to /addresses/esri - 1 group wrx, the other group just r.

So how to do this? Do I need to add the 2nd group using ACLs?

Should I:

sudo chmod 770 /addresses/esri
sudo setfacl -d -m g:AddressReader:r /addesses/esri
sudo setfacl -d -m g:AddressCollector:rwx /addesses/esri

Will that do it? I have no doubt I'm missing something, but what?

Thanks
--

Mike. Leone, <mailto:turgon@mike-leone.com>

PGP Fingerprint: 0AA8 DC47 CB63 AE3F C739 6BF9 9AB4 1EF6 5AA5 BCDF
Photo Gallery: <http://www.flickr.com/photos/mikeleonephotos>

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug