Wordpress + FTP can download files but cannot upload


I’ve set up my droplet (Ubuntu 16.04.04 x64 + LEMP) and installed Wordpress following the DigitalOcean tutorials but I have an issue with modifying files via FTP/SFTP.

I use SublimeText, but I’ve also tested it with Filezilla and both seem to behave the same way, so it looks like a server setting.

I have a sudo user called ‘sam’ for admin I have a normal user who I chown the files to called ‘www-john’

What happens

I log in using my sudo user (SSH key is loaded into Pageant) and I can log connect to the server successfully.

I can browse pretty the whole directory and I can download any file.

However, I cannot seem to upload.

When I do, I get an error message

  • SublimeText = … failure (Permission denied)
  • Filezilla = … open for write: permission denied

What I’ve tried so far

  • Setting the chown ownership of /var/www/ to sam
  • Setting the chown ownership of /var/www/ to www-john
  • Setting the chown ownership of /var/www/ to www-data
  • Setting the Wordpress permissions to 755 for the folders and 644 for the files

Any advice on how I can download and upload via FTP please?

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hello, @theol

I had a similar issue when using Sublime text and sshfs in order to directly change the code of any of my files and the issue was caused from the fact that I’ve needed to open Sublime Text via sudo each time, or I will get the failure (Permission denied) error as well.

Did you checked the permissions of the folders you’re trying to access and upload files to?

Regards, Alex