I've studied this for days and I cannot find the solution. I have 2 ftp users. Settings in /etc/vsftpd.conf:

write_enable=YES chroot_local_user=YES allow_writeable_chroot=YES 

The shell that this user logs into is /bin/ftponly. The code is:

#!/bin/sh echo "This account is limited to FTP access only." #!/bin/sh echo "This account is limited to FTP access only." 

The user is restricted to an ftp shell and cannot open terminal.

When a user (ex deanhh) uploads a NEW file the permissions are: -rw------- 1 deanhh deanhh 118 Jan 3 19:48 testfile This looks like umask for the user (deanhh) is 0077 correct?

I cannot find where this is being set. I've looked at:
/etc/vsftpd.conf
/etc/login.defs
/home/deanhh/.bashrc
/home/deanhh/.profile

None of these files set that umask. Also, the 'home' directory for deanhh is /var/www/deanhh.com not /home/deanhh (which does exist) There are no files or subfolders in /var/www/deanhh.com to indicate the umask or any user settings.

How can I determine where umask is being set for ftp users (namely deanhh)?

1 Answer

You set it in /etc/vsftpd.conf.

In case you are wondering about the current permissions: the local_umask setting defaults to 077, disabling groups and others to access files in any way (as you already noticed).

Several options you can have for user auth:

anonymous_enable=NO local_enable=YES write_enable=YES local_umask=0002 anon_upload_enable=YES anon_mkdir_write_enable=YES file_open_mode=0777 
  • file_open_mode sets the default setting of files. 777 sets it readable, writeable and executable for anyone. With local_umask set to 002, this gives you 775.
2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy