1

Whenever i've sent a file via FTP, it's chmod has been setted to 600. So they never read/run without i change to chmod.

I dont want to change this chmods everytime. How can i change this file's defaults ?

Thank you!

  • some ftp clients (filezilla, for example) can set permissions - maybe take a look at the configuration on the ftp client side? – LuWi Apr 18 '14 at 23:45
  • yes i can change permissions for each file via filezilla, but i can not read global settings for server. – Can Apr 19 '14 at 9:24
  • also i could not find any related thing into "sudo nano /etc/vsftpd.conf" – Can Apr 19 '14 at 9:25
  • You can change the default permissions using umask – Gerben Apr 19 '14 at 14:48
2

You have to set file_open_mode value in /etc/vsftpd.conf file. Config file may not contain that key=value pair in default. Add as you want. But to enable this function you have to set chmod_enable value as YES

From the vsftpd.conf man page:

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 value in /etc/vsftpd.conf file.

chmod_enable=YES  
file_open_mode=0644
local_umask=022

If you want to change umask of files that uploaded anonymously you can use anon_umask value.

anon_umask=022

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.