Set default permissions for new files in Linux directory
See here for the original answer.
I think what you're looking for here is the setfacl
command, which sets the default permissions for a specified directory. After you mount the directory, try the following:
sudo setfacl -d -m u:www-data:rwx /www
If you want to change the existing permissions as well, add the -R
flag:
sudo setfacl -R -d -m u:www-data:rwx /www