Question

Wordpress + FTP can download files but cannot upload

Posted June 29, 2018 1.2k views
NginxWordPress

Hi

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/mydomain.com to sam
  • Setting the chown ownership of /var/www/mydomain.com to www-john
  • Setting the chown ownership of /var/www/mydomain.com 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?

1 comment

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.

×
1 answer

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

Submit an Answer