I have an sftp-server and need to set all files' permissions to 775 which upload from client.How can I do that? Just found the umask set,but it is not fit for me as client may upload file with 664 permissions.
9
-
possible duplicate of How to put desired umask with SFTP? – quanta Oct 7 '11 at 6:59
-
"but it is not fit for me as client may upload file with 664 permissions." --> what do you mean? – quanta Oct 7 '11 at 7:00
-
umask just help you mask the client upload files' permissions like (0777 -> umask 0022 -> 0755). – frankyue Oct 7 '11 at 7:04
-
But I want to set all files permissions like (chmod 644 upload_file) – frankyue Oct 7 '11 at 7:07
-
You want 775 or 644? – quanta Oct 7 '11 at 7:10
|
Show 4 more comments
And how can I set to make all files to 775 whatever the client upload?
You cannot.
Resulting permission = Default permission AND (NOT umask)
With file:
default permission = 666 = 110 110 110
umask = whatever
resulting permission = xx0 xx0 xx0
In summary, you cannot create an executable file using umask
.