Question

Permission issue for Wordpress under Ubuntu

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 https://www.digitalocean.com/community/tutorials/how-to-configure-secure-updates-and-installations-in-wordpress-on-ubuntu

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 ! ;-))


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.

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