Permission issues with Ubuntu & Wordpress (chown fails)

So I'm running 10.04 and for some reason when I try to upload a theme on wordpress I get the following error:

The uploaded file could not be moved to /home/user/public_html/wp-content/uploads/2011/06.

So I tried doing chmod 777 to the directory and I get an error of Operation not Permitted. So I tried doing chown -r user /home/user/

and that didnt resolve the issue so I tried chown user /home/user/public_html/wp-content/uploads/2011/06/

and still getting the permission error which is weird…. Any suggestions are greatly appreciated oh and I checked to see who owns the directory and:

drwxrwxrwx 2 www-data www-data 4096 2011-06-24 14:24 .

drwxrwxrwx 3 www-data www-data 4096 2011-06-24 14:24 ..

but yet chown from root is not allowing me to change owner to user =/

Two linode staff tried to help with a few suggestions but it didnt resolve the issue and they advised I reach out to the community for help.

2 Replies

check that your web server has write permissions to /home/user/public_html/wp-content/uploads

Running wordpress out of your home directory could be problematic for this sort of thing (in place updates/installs).

It will basically want the entire path (/home/user/public_html/) to be www-data.

If you are able to run wordpress from, say, /var/www/mywebsite.com/ that may be better. Then you can:

sudo chown -R www-data:www-data /var/www/

And all of the wordpress updates/installs should work ok.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct