Report this

What is the reason for this report?

SFTP / Wordpress Permissions

Posted on July 26, 2015
Xugo

By Xugo

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.



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!

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.

Hi Xugo,

I recommend the following page from Wordpress, which will give you a best practice idea. https://codex.wordpress.org/Changing_File_Permissions

This comment has been deleted

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.