Description of problem: anon_umask and local_umask don't work even when the file creation mode is explicitly set as is the following example: anon_umask=011 local_umask=011 file_open_mode=0666 Files should upload as rw-rw-rw- but that is not the case. Version-Release number of selected component (if applicable): vsftpd-2.0.1-5.EL4.4 How reproducible: Always. Steps to Reproduce: 1. Configure /etc/vsftpd/vsftpd.conf with the above options. 2. Upload a file as a local user. 3. Actual results: Files get uploaded as rw-------. Expected results: Files should get uploaded as rw-rw-rw-. Additional info: I am mapping local users to the anonymous user, but not allowing anonymous logins. I am also disabling SITE CHMOD so it can't be the ftp client doing it. anonymous_enable=NO local_enable=YES guest_enable=YES ftp_username=ftp guest_username=ftp chmod_enable=NO
Well... I can fix this but I don't know why: I was using: chown_uploads=YES chown_username=ftp which implements the default anyway. If I set: chown_uploads=NO then the umask and file_open_mode options work as expected. However I don't know why these options should interfere with each other, and I don't think they should.
I tried vsftpd-2.0.5-3 in configuration: anonymous_enable=NO local_enable=YES write_enable=YES listen=YES chroot_local_user=YES tcp_wrappers=YES local_umask=011 file_open_mode=0666 chmod_enable=NO I put file to server as local user and file get uploaded with -rw-rw-rw-, as it has to. Options chown_* have no efect. Please send me all your configuration options.
Created attachment 135452 [details] vsftpd configuration setting chown_uploads=NO will make this work, but as it is, it won't.
Section of commented lines above chown_uploads directive: # If enabled, all anonymously uploaded files will have the # ownership changed to the user specified in the setting chown_username. This # is useful from an administrative, and perhaps security, standpoint. Note # that this breaks the permission setting behaviour of the umask and # file_open_mode directives, so use only if you need to chown uploads to a # user other than the default anonymous user (ftp). Now closing this bug as not a bug. If you have any consideration, please reopen this bug.