Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 :)

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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 ?

share|improve this answer
    
yes I have restarted /etc/init.d/vsftpd restart is what i used –  Katafalkas Oct 16 '12 at 11:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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