SFTP / Wordpress Permissions

It seems this question has come up quite a bit before, but I wasn’t able to find a working solution.

Installation: Ubuntu WordPress on 14.04

The problem I originally had was when I tried to upload a plugin for my Wordpress site through SFTP (FileZilla) using [userName] I received an error saying Permission Denied. I followed the responses from similar questions and did as suggested

sudo usermod -a -G www-data [userName]
sudo chmod -R g+w /var/www/

And was then able to upload files. However, when I went on to Wordpress and tried to update the new plugin, I was met there with a Permission Denied.

If I view the plugin folder within FileZilla I can see the Owner/Group is “[userName] [userName]” as opposed to www-data www-data as with everything else. I saw comments on other questions providing manual steps one could take to change permissions for the specific file, but I was wondering if there was a permanent solution as logging into the console and manually changing permissions every time could become tedious.

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.

This comment has been deleted

Hi Xugo,

I recommend the following page from Wordpress, which will give you a best practice idea.