Question

I am trying to use umask to create default permission to directories that I create but it does not work. I want files created in FTP have automatically permission 777 (my server is running LAMP on CENTOS).

I tried umask 000 but always I create a folder it has permission 666 not 777.

How can I fix this?

Was it helpful?

Solution

If it is vsftpd, see if you have file_open_mode setting in vsftpd.conf. man vsftpd.conf says

file_open_mode
The permissions with which uploaded files are created. Umasks are applied on top of 
this value. You may wish to change to 0777 if you want uploaded files to be executable.
Default: 0666

(Ref: https://security.appspot.com/vsftpd/vsftpd_conf.html)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top