Question
How do I set permissions for uploading media in WordPress? (Ubuntu 14.04.1, nginx 1.4.6)
I’m having trouble finding the correct permissions for running a WordPress site on my droplet. I followed this guide to configure the site: How To Configure Secure Updates and Installations in WordPress on Ubuntu
Configuration is as follows:
- Ubuntu 14.04, nginx 1.4.6
- nginx user is
www-data
/var/www/*
is owned bywp-user:wp-user
- Directories are set to
755
and files to644
(WordPress docs)
Secure updates and theme/plugin installations work as expected, but I receive the following error when attempting to upload new media through the web interface: Unable to create directory wp-content/uploads/2014/11. Is its parent directory writable by the server?
Any thoughts on how I can configure owners/permissions to allow this (while maintaining security)?
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
I followed this tutorial But can’t solve this issue of wordpress update on ngnix server.
I am stuck at
sudo chown wp-user:www-data /home/wp-user/wp_rsa*
After this command what should I do fon ngnix ?
@khanalkafi If you follow that tutorial, the updates should work. The tutorial states that the next step is to create the
.ssh/
dir and create an authorized key.