View Full Version : [all variants] [SOLVED] vsftpd permissions of files being uploaded
kerryhall
July 3rd, 2008, 03:37 PM
How can I change the default permissions of files that are uploaded via ftp with vsftpd?
Right now when files get uploaded, they default to -rw-------
I want them to default to something like -rw-r--r--
Thanks!
nix4me
July 3rd, 2008, 06:55 PM
easy. change local_umask=077 to local_umask=022. That will set 755 permissions.
Read the docs here:
http://vsftpd.beasts.org/vsftpd_conf.html
RealPSL
July 3rd, 2008, 07:00 PM
Good security practice for your web server says the files should have permissions rw-r----- (umask 027). However if you want it to have umask 022 like you describe you need to change the local_umask from 077 (default) to 027. More information is available in the man pages for vsftpd.conf. The change needs to be made in the vsftpd.conf file and the ftp server restarted with
sudo /etc/init.d/vsftpd restart
kerryhall
July 7th, 2008, 05:57 PM
Thanks to both of you for your help! :)
possumator
July 22nd, 2008, 10:45 PM
I am not very experienced with Linux, but have an 8.04 server running a LAMP + SVN + FTP configuration on an old P2 366mhz laptop. This is my web development testing rig and it runs fine.
Naturally, I would like to FTP directly into the /var/www directory. So hoping the above posts will help me. Up to now I have been moving the content manually to /var/www.
That said, what are the appropriate permissions for content living in /var/www? This is just a bunch of static xhtml pages. I couldn't seem to get apache 2.2 to load them short of giving them full permissions. I even tried CHOWN to www-data:www-data as after upload everything had root:root.
thanks for any help.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.