A common issue when using droplets from Digital Ocean if post ProFTPD installation and you wish to upload your website to /var/www. By following the standard tutorials, your user wont have access to the folder.

Here is what you need to do…

Install ProFTPD

https://www.digitalocean.com/community/articles/how-to-set-up-proftpd-on-ubuntu-12-04

Edit ProFTPD Config

Re-edit the config and re-comment out the Default Root line

sudo nano /etc/proftpd/proftpd.conf

Find the correct line and re-comment it out

# Use this to jail all users in their homes
# DefaultRoot
Restart PtoFTPD
sudo service proftpd restart

Confirm the Group allocation for /var/www

stat /var/www

Output from the comment should show something like this..

File: `/var/www'
Size: 20480 Blocks: 40 IO Block: 4096 directory
Device: fd00h/64768d Inode: 1312692 Links: 11
Access: (0775/drwxrwxr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2013-08-23 08:54:30.290042645 +0000
Modify: 2013-08-23 11:20:25.322055581 +0000
Change: 2013-08-23 11:20:25.322055581 +0000
The Group here is shown under "Gid: ( 0/ root)" as root.

We now need to change our non-root user that we use for FTP to belong to the same Group (root)

usermod -a -G root YOURUSER
When you now FTP into your droplet, you can navigate to /var/www and upload files!
It's only fair to share...Share on Facebook
Facebook
Share on Google+
Google+
Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin
Email this to someone
email