Change VSFTPD uploaded file permissions

When you upload files to a webserver (eg) and the username of the ftp client is different than webserver (apache) username the upload files are by default owned by the uploaded user of the ftp. Therefore apache may not be able to read the files.

It is difficult and time consuming to reset the permission manually by issuing a command like:
sudo chmod 755 -Rf images/

A quick way is to add the umask in /etc/vsftpd.conf as:
local_umask= 022 or 000

Another way around is to use the same username for both apache and ftp client.

Leave a Comment

Your email address will not be published. Required fields are marked *