Gravatar

sidahldesign

April 21, 2013

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

Tagged In: Nginx, Arch Linux

does anyone have any idea how to solve it . i am running arch with nignx.

Share this Question

Vote on Hacker News
  • Gravatar Euan Torano April 21, 2013
    Which user is nginx running under? Which group owns wp-content/uploads? What are the chmod permissions on wp-content/uploads?
  • Gravatar Goran Ljubuncic May 2, 2013
    not nginx expert but i think same as apache www-data
    chmod your directory and you should be fine
  • Gravatar JustGiveMeTheDamnManual June 20, 2013
    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
  • Gravatar JustGiveMeTheDamnManual June 20, 2013
    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.
  • Gravatar Jason March 4, 2014
    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!

  • Gravatar Kamal Nasser March 4, 2014
    @Jason: Try running
    sudo chmod -R g+w /var/www/wordpress/wp-content
    
    sudo chgrp www-data /var/www/wordpress/wp-content
  • Gravatar prasad0889 March 14, 2014
    Hi,

    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.
  • Gravatar Kamal Nasser March 15, 2014
    @prasad0889: What's the output of
    sudo ps wwaux | grep php
    ?
Create an account or login:
Ajax-loader