New answers tagged vsftpd
Perhaps you overlooked this (from vsftpd.conf(5)): anon_umask The value that the umask for file creation is set to for anonymous users. NOTE! If you want to specify octal values, remember the "0" prefix otherwise the value will be treated as a base 10 integer! Default: 077
Simply create a new group and add ftpuser1 and nginx to them. Then, use chgrp to change the group of the directory to your new group and chmod to make the directory group writeable. It should look something like this: groupadd fooey gpasswd -a ftpuser1 fooey gpasswd -a nginx fooey chgrp -R fooey DIRECTORY chmod -R 775 DIRECTORY
vsftpd takes all information from /etc/passwd and /etc/groups with local users. To make your publichttp user uploaded files belong to ftpusers group, you need to set primary gid of publichttp user to ftpusers group in /etc/passwd.
You may reduce the likely hood of a random attack but your data is still visible in transit. There are 2 better options: 1) Install a SSL certificate in your FTP server to secure the data. Digital Ocean: Configure vsftpd to Use SSL/TLS on Ubuntu. This assumes your using VSFTPD. But there are plenty of how to's for other servers as well. 2) BEST OPTION ...
If you are using a normal ftp connection, you got a security risk by default, due to the connection is not being encrypted. You will risk presenting critical data to an outside party. If you run a ssh server on that system you can use sftp insted to tunnel your ftp session over the ssh server.
Top 50 recent answers are included