I'm the local user on a system with admin rights. I would like to change the way the default owner and group permissions are set, when new files are created in the specified folder /var/www/html/somefolder
I can for example, run sudo chown -R leon:www-data somefolder
, but if I create any new files in this folder, they are going to default to leon:leon
.
Is there something I can do to the folder that will set any files or folder permissions created by me in /var/www/html/somefolder to be automatically set to leon:www-data
?
Thanks.
setgid
on the folder: see for example Dynamically set user groups for directories and files on a directory – steeldriver Dec 23 '19 at 13:28setfacl -d
would have been what I would have done but theg+s
is shorter, so my question is there a difference between the two commands @steeldriver – George Udosen Dec 23 '19 at 13:34