Dear all devs,

after beeing asked a lot of times to set permissions on linux file systems in a way that multiple users always have write access to files generated by another user (for example “apache”, “deployment”, dev user), I’d like to give you some idea how you can run this yourself on your laptops or dev server systems:

Here is a code example that sets facl (file access control, some extended permission system) on a directory. This permissions are automatically passed on to files and directories within this directory (even if these get created later):

TARGET="log"
sudo setfacl -R --set u:r.kuehle:rwX,u:48:rwX,u::rwX,g::rX,o::- $TARGET
sudo chown -R root:root $TARGET
for t in $TARGET; do getfacl -p --access $t | sudo setfacl -dRM - $t; done 

Kind regards,

Gunnar


-- 

Mit freundlichen Grüßen

Gunnar Mann 

- Systemadministration - 
________________________________________________________ 

TraSo GmbH

Nonnenstraße 42
D-04229 Leipzig

Tel.: +49 341 355 740 76 
Fax: +49 341 355 740 21 
E-Mail: g.mann@traso.de 


________________________________________________________
Geschäftsführer: Haiko Gerdes
Handelsregister: Amtsgericht Leipzig, HRB 21850