Permission issue for Wordpress under Ubuntu

October 25, 2015 1.6k views
WordPress One-Click Install Apps

I've done a lot of research with the post already existing, but now I need some personal advise !

I've set up a Wordpress with the 1-click install, imported my Wordpress site. I then followed this tutorial

I've check the permission on folders using the ls -l command. They are all « wp-user ». But if I check what user my wordpress run under, it's « www-data ».

I can't upload media via the Wordpress interface, also can't remove certain extension... looks like a permission issue, if I change the upload folder to 777, it works. Should Wordpress run under « wp-user » instead of « www-data » ?

Thanks for your help and clear answer (i'm not a pro ! ;-))

1 Answer

First, I would strongly recommend not setting your permissions to 777. This is a serious security concern. The user wp-user does not exist by default on Ubuntu and is likely left over from the host you exported your site from. All your web files should be owned by www-data. Assuming your web root remains /var/www/html (the default on the WP one-click image) you can fix the ownership with:

chown -Rf www-data.www-data /var/www/html
Have another answer? Share your knowledge.