Bug 197458 - anon_umask and local_umask don't work
Summary: anon_umask and local_umask don't work
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: vsftpd
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Maros Barabas
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-07-02 03:36 UTC by Ian Laurie
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-05-23 07:58:34 UTC
Target Upstream Version:
Embargoed:


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

Description Ian Laurie 2006-07-02 03:36:55 UTC
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 04:14:03 UTC
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 10:19:23 UTC
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 04:45:20 UTC
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 07:58:34 UTC
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.