Have a wierd issue with permissions on files uploaded to a remote system.
Locally, the file index2.html is chmod 664:
acoder@acoder-local ~ $ ll index2.html
-rw-rw-r-- 1 acoder acoder 29 May 17 14:46 index2.html
After uploading this same file to the remote system, the permissions on the remote directory show:
-rw-r--r--. 1 acoder acoder 3657 May 17 14:43 index2.html
I first thought I had incorrect umask setting on the remote system, but...
[acoder@remote public_html]$ umask
0002
For comparison, if I touch a file on the remote system, the correct permissions (for the given umask) show:
-rw-rw-r--. 1 acoder acoder 0 May 17 14:44 index3.html
So, how are permissions set on files uploaded via sftp? Why is umask ignored when placing files over sftp?
Asked by a coder
(3343 rep)
May 17, 2018, 06:57 PM
Last activity: Jun 20, 2023, 11:55 PM
Last activity: Jun 20, 2023, 11:55 PM