When I create new files and folders in a specific folder, I would like them to inherit the group and permissions of the parent folder. Is this possible ?
For example
mkdir -p example.com/public
cd example.com
sudo chgrp apache public
chmod 775 public
Now when I create a new folder
cd public
mkdir test
ls -al
drwxrwxr-x 3 foo bar 4096 Nov 3 16:19 public
The test directory belongs to foo and my default group bar. I'd like new folder to belong to the apache group instead.
I'd like the same behavior for files.
Any ideas?
umaskcommand): http://serverfault.com/questions/383734/how-do-i-set-default-umask-in-apache-on-debian – muru Nov 03 '14 at 21:26umaskis the only way but say that ACL is the tool to use but there may be problems currently. For how long is a bug relevant, and for how long are the answers here read? – Hauke Laging Nov 03 '14 at 22:16