2

Let me first say that there are loads of topics regarding this, and I am sure i have seen them all by now. Still non of the solutions seem to help.

I installed vsftpd. created a user ftp-data. Now I need that files uploaded by user ftp-data would have 755 permissions. Solving this should be as easy as adding:

local_umask=002
file_open_mode=0755

but that did not help, then I have tried a number of variations of this, still did not help.

The I added:

chmod_enable=YES

still did not help.

At the moment I think that I am missing something very simple and obvious, just cant find it. Maybe someone could help me to find what I am missing.

This is my config file:

anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=002
anon_upload_enable=NO
anon_mkdir_write_enable=NO
dirmessage_enable=NO
xferlog_enable=YES
connect_from_port_20=YES
xferlog_file=/var/log/xferlog
listen=YES
local_root=/var/www/ftp-gallery
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES

EDIT: Solved it. It was a problem with the client I was using. The FTP client itself was changing permissions :)

0

Using the local_umask and file_open_mode as you describe works as expected on a system I have to hand.

Did you remember to restart the vsftpd service after making the changes ?

  • yes I have restarted /etc/init.d/vsftpd restart is what i used – Katafalkas Oct 16 '12 at 11:06
0

I was having similar problem, my files were uploaded with permission of 600 and folders were with 700.

I had to change the local_umask to 022 to get the right permissions to be set when the files are uploaded over FTP over TLS encryption.

# in etc/vsftpd.conf
local_umask=022

This made the permision set for uploaded files to be 644 and folder to be 755 Then of course, i had to restart the vsftpd service using

systemctl restart vsftpd

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.