5

Whenever I upload a file to my FTP server running VSFTP, the file permissions on it are defaulted to 600 (rw-------). How can I change it to 775 (rwxr-xr-x)?

sebix
  • 4,175
  • 2
  • 25
  • 45
Chiggins
  • 791
  • 7
  • 20
  • 37
  • Here is the well explained answer: https://serverfault.com/questions/201305/default-owner-permissions-of-created-files-via-vsftpd – A. Dziedziczak May 15 '17 at 12:25

2 Answers2

5

Seems like someone has modified your umask already since acording to the vsftpd man file the default is 776. Check your config for the following values and adjust accordingly.

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

local_umask

The value that the umask for file creation is set to for local users. NOTE! If you want to specify octal values, remember the "0" prefix otherwise the value will be treated as a base 10 integer!

Default: 077

Zypher
  • 36,995
  • 5
  • 52
  • 95
0

For anonymous mode, add following configuration to vsftpd.conf:

anon_umask=011
file_open_mode=0777
anon_upload_enable=YES
anon_mkdir_write_enable=YES
anon_other_write_enable=YES
sailfish009
  • 101
  • 2