Unix permissions with Wordpress on Ubuntu 14.04

I’m trying to wrap my head around unix permissions. The problem I’m having is that Wordpress isn’t able to update itself… instead it’s giving me an FTP prompt. On the Wordpress website it clearly says that this is normal behavior when Wordpress doesn’t have correct unix permissions setup.

So from what I understand I need to give the unix user which Wordpress operates with, correct permissions?

Running echo exec(‘groups’) returns www-data Running echo exec(‘whoami’) returns www-data

But even after changing the file owner to www-data on almost every file and folder it still doesn’t work.

I’m sure it’s something very basic that I’m missing…

Do I need to restart some service after I changed permissions?

Any idea what I should do?

Help/guidance is appreciated!

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.

Thank you MrPeppah for getting back to me so quick.

I followed your advice and changed owner and group all files and folders to www-data. This actually made it work, but I’m concerned about the safety here. Isn’t this considered bad practice?

Have you tried

chown -R www-data:www-data /web/directory/

I typically have this issue when I run my LEMP(nginx) stacks and the above command fixes it. The problem is the WordPress can’t write to the directory. Once you do this restart Apache.