Question

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

Posted August 11, 2013 46.6k views
Hello I have been trying to upload an image into my Wordpress dashboard without success. Every time I try to upload the image, I get an error like below: Unable to create directory wp-content/uploads/2013/08. Is its parent directory writable by the server? I am using CentOS 6.4 with latest Wordpress. My WP is located in /dir1/dir2/dir3/wordpress, and below this, wp-content has "uploads" directory and within this 2013/08 directories. Additionally, I had to create uploads/2013/08 as they did not exist in the original installation process following the instructions from DO. I have changed permission and that too did not work. Same upload error shows still. This is what I do to see the error from Wordpress: 1. Dashboard --> Pages --> 'Add Media' 2. Dashboard --> Media --> 'Add New' As mentioned, uploading an image shows the error stated above regardless of which image I choose. I have not had any problem installing themes or plugins, just the problem with image upload. I have rebooted my host, also, and retired image upload without success. My host has LAMP (CentOS) and WordPress. Please could you suggest a fix for this kindly. Thank you.

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
25 answers
Run the following command as root:

chmod -R 777 /dir1/dir2/dir3/wordpress/wp-content/uploads


That should fix it.
Yeap, have done that...and also done this:

chgrp -R apache /dir1/dir2/dir3/wp-contents
chmod -R g+w /dir1/dir2/dir3/wp-contents

Got directories to look like this:

drwxrwxrwx 5 apache apache 4096 Aug 10 15:23 wp-content
drwxrwxrwx 3 apache apache 4096 Aug 10 15:27 uploads
drwxrwxrwx 3 apache apache 4096 Aug 10 15:27 2013
drwxrwxrwx 2 apache apache 4096 Aug 10 15:27 08

Then retried uploading image again, and still not joy...
Hmm, try deleting the 2013 and 08 directories you created and have Wordpress create them.
This work for me in Ubuntu - use sudo/su, I am not sure about the name of the httpd user - perhaps this is the issue

sudo chown -R www-data:www-data /var/www/your_site_dir
sudo chmod -R 775 /var/www/your_site_dir
Ok. So after a couple of days I have the same problem. Anyone have an idea I already tried all of the above.
@chupa: Is it working for you or not? I'm not sure what you mean.

You said
This work for me in Ubuntu - use sudo/su, I am not sure about the name of the httpd user - perhaps this is the issue 

But now you're saying you're having the same problem.

Try chmod -R 777 /var/www/your_site_dir/wp-content/uploads as root -- does that fix it?
I tried to answer ensign.yc198 question, but I am not clear enough. Actually I was forgot about this question here and then today - BAM - this annoying problem happen to me. And I got here from google looking for solution as I was sure it is nor permission or owner.

I feel stupid now - my problem was that this was moved installation, and all I had to do is to change the folder path under "Settings->Media".
Oh, glad you figured it out! :]
to FTP server / right-click 'wp-content' and select 'File Permissions' A popup screen will appear. Then click OK.
Previous 1 2 3 Next