Unable to create directory wp-content/uploads/2013/04. Is its parent directory writable by the server?

Posted April 21, 2013 13.6k views
does anyone have any idea how to solve it . i am running arch with nignx.

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.

Submit an Answer
8 answers
@Jason: Try running
sudo chmod -R g+w /var/www/wordpress/wp-content

sudo chgrp www-data /var/www/wordpress/wp-content
  • I think that second command should be recursive:

    sudo chgrp -R www-data /var/www/wordpress/wp-content

    or use:

    sudo chown -R :www-data  /var/www/wordpress/wp-content
Which user is nginx running under? Which group owns wp-content/uploads? What are the chmod permissions on wp-content/uploads?
not nginx expert but i think same as apache www-data
chmod your directory and you should be fine
I'm by far from an expert but this worked for me

chgrp nginx /var/www/wordpress/wp-content
sudo chown nginx /var/www/wordpress/wp-content
Also use this command to find out what user owns the nginx worker processes

ps -elf | grep nginx

In my above comment "nginx" was the name of the user who owned the process.
Hmm... this isn't working for me for some reason. Here is what I get with ps -elf | grep nginx:
$ ps -elf | grep nginx
55:1 S root 700 1 0 80 0 - 1501 rt_sig 20:24 ? 00:00:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
56:5 S www-data 702 700 0 80 0 - 1659 ep_pol 20:24 ? 00:00:00 nginx: worker process
72:0 S vagrant 874 32356 0 80 0 - 1156 pipe_w 20:33 pts/0 00:00:00 grep --color=auto -in nginx

I've tried everything - changing permissions and ownership so I can upload plugins and images to my WordPress install. I'm really not understanding why it's not working. Really frustrating!


System : I have centos 6 with nginx. I have installed ghost and wordpress on the server.

I have tried the above methods but it doesnt help.
I have restarted nginx, mysql, php-fpm and also rebooted the server, but it still shows me the error "Cant create directory".

Please help me.
@prasad0889: What's the output of
sudo ps wwaux | grep php