2
1
I'm running Ubuntu Server 14.04.2 LTS and I've installed acl
using sudo apt-get install acl
.
I'm trying to create a www
folder under /srv
that the web server has read/write access to in addition to my user account. I want all future folders and files created under /srv/www
to inherit permissions, user, and group.
Here is my progress:
cd /srv
sudo mkdir www
sudo chown -R ryan:www-data www/
sudo chmod -R a-rwx www/
sudo chmod -R ug+rwX www/
sudo setfacl -Rdm u:ryan:rwX,g:www-data:rwX www/
getfacl www/
Output:
# file: www/
# owner: ryan
# group: www-data
user::rwx
group::rwx
other::---
default:user::rwx
default:user:ryan:rwx
default:group::rwx
default:group:www-data:rwx
default:mask::rwx
default:other::---
Problem is, whenever I create a new file or folder in www/
the permissions are inherited but not the owner or group. How do I get the owner and group to inherit? I thought specifying a user or group between the colons :[user or group]: would cause them to be inherited?