How to change the permissions of files uploaded via ftp with vsftpd?

Following with the issues we had while configuring the ftp account in the Ubuntu server with vsftpd, we bring you another advice today.

In our case, we had to configure a webcam to upload images, and this is why we created the ftp server and user.

When I started uploading images, the permissions of the uploaded files were very restricted and I wanted to change them to 755 so the files could be seen from the browser.

So I followed this http://tosbourn.com/changing-upload-permissions-in-vsftpd/. Basically you have to edit the config file:

sudo nano /etc/vsftpd.conf

and make sure you have these three lines:

local_umask=002
chmod_enable=YES
file_open_mode=0755

Then restart the ftp server

sudo restart vsftpd

Note: To me, restarting the service did not reload the configuration, so I had to reboot the server:

sudo shutdown -r now

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s