I am running Ubuntu 16.04.
I have several users that are within the www-data group and will be creating/modifying files on the server.
We'll call them user1 and user2.
Any time user1 or user2 creates a folder or file within /var/www/sites/domain1.com/public
I would like the owner and group to default to www-data.
I would like the files to have the permissions of 0664 and the folders to have the permissions of 0775.
So lets say user1 is logged in and creates a file called test-file.txt
If I run:
ls -l on /var/www/sites/domain1.com/public
I would like the output to look like:
-rw-rw-r-- www-data www-data test-file.txt
I believe this can be done with setfacl
, but am not quite sure what the command would be or if there is a better way.