I have files in /var/www that I've set permissions as follows:
user:www-data
chmod 755
How can I set it so all subsequent files uploaded (via SFTP) have those same permissions and I don't have to keep re-running chown/chgrp/chmod -R?
|
I have files in /var/www that I've set permissions as follows:
How can I set it so all subsequent files uploaded (via SFTP) have those same permissions and I don't have to keep re-running
| ||||
|
feedback
|
| |||
|
feedback
|
|
Mar_Garina has the right answer. When you create files, the value of umask is used to determine what default permissions the files are created with. I would just add that there are several places this can be set. If you want the default to be system wide for all users, it might make sense to put the | |||
feedback
|
|
A much better answer, for 2011, is to use ACLs via setfacl:
Now any file created in that directory will be created with any and all default permissions you have. You can query the ACLs for any given file/directory by using the command
| |||
|
feedback
|