Bigun Advocate
Joined: 21 Sep 2003 Posts: 2198
|
Posted: Fri May 13, 2011 1:36 am Post subject: Issues getting permissions set for uploaded files-VSFTPD (s) |
|
|
Here are my configuration files:
/etc/vsftpd/vsftpd.conf:
Code: | local_enable=YES
write_enable=YES
anonymous_enable=NO
xferlog_enable=YES
xferlog_file=/var/log/vsftpd/vsftpd.log
idle_session_timeout=600
data_connection_timeout=120
ascii_upload_enable=NO
ascii_download_enable=NO
dirmessage_enable=YES
ftpd_banner=Please Login
chroot_list_enable=NO
chroot_local_user=YES
#background=YES
listen=YES
ls_recurse_enable=NO
user_config_dir=/etc/vsftpd/users
|
/etc/vsftpd/users/sampleuser:
Code: | anon_mkdir_write_enable=NO
anon_other_write_enable=NO
anon_upload_enable=NO
dirlist_enable=YES
download_enable=YES
local_root=/var/www/sampleuser
write_enable=YES
chmod_enable=YES
local_umask=0644
file_open_mode=0644
anon_umask=0644
|
Every file uploaded gets the octal permission set of 600. I'm trying to make it so I can set permissions on files uploaded based on the user who is doing the uploading. The last 4 lines in the "sampleuser" config were a collaborative attempt of several google sessions. Any help is appreciated.
*edit*
Got it solved. I changed the last lines of code to the following:
Code: | chmod_enable=YES
local_umask=002
anon_umask=007
file_open_mode=0644
|
I don't know why this made a difference, but an explanation would be nice. _________________ "It's ok, they might have guns but we have flowers." - Perpetual Victim |
|