Bug 197458 - anon_umask and local_umask don't work
anon_umask and local_umask don't work
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: vsftpd (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Maros Barabas
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-07-01 23:36 EDT by Ian Laurie
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-05-23 03:58:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
vsftpd configuration (31.08 KB, text/plain)
2006-09-03 00:45 EDT, Ian Laurie
no flags Details

  None (edit)
Description Ian Laurie 2006-07-01 23:36:55 EDT
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
Comment 1 Ian Laurie 2006-07-02 00:14:03 EDT
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.
Comment 2 Maros Barabas 2006-08-08 06:19:23 EDT
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.
Comment 3 Ian Laurie 2006-09-03 00:45:20 EDT
Created attachment 135452 [details]
vsftpd configuration

setting chown_uploads=NO will make this work, but as it is, it won't.
Comment 5 Maros Barabas 2007-05-23 03:58:34 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.