Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Uploading an image to add to a page, I got a message saying: Unable to create directory... Is its parent directory writable by the server?

Assuming the issue is that the parent directory needs to be made writable by the server, how do I make the parent directory writable by the server?

Thanks, Richard

share|improve this question
    
Are you developing this site on your local machine or a server? –  Chris Carson Aug 8 '11 at 12:39
1  
How to change server file/directory permissions is really a server question, and not a WordPress question. –  Chip Bennett Feb 26 '12 at 19:37
add comment

4 Answers

up vote 0 down vote accepted

Here is how to change your folder permissions.

  • Login to your ftp
  • Make your wp-content folder 755 (In most FTP programs, this involves right-clicking -> "Permissions"). 755 is owner: read, write and execute permissions; group: read and execute permissions; others: read and execute permissions.
  • Inside wp-content create a new folder called "uploads", make it 755 (if not working, try 777 for testing, but never make a live site 777)
  • Inside the control admin panel, go to settings>miscellaneous and on the first line enter "wp-content/uploads" as where your uploads will go to.

If this does not work you will have to log in to your server via SSH and make sure the ownership of the web folders are set to the webserver user (using the chown command)

share|improve this answer
    
I would recommend only using 777 as a last resort, try 755 on the uploads directory first. –  jjeaton Aug 8 '11 at 16:29
    
Under no circumstances should any WP directory be 777 –  songdogtech Aug 8 '11 at 18:59
    
Here are the recommended file permissions for WordPress, as per the Codex. –  Chip Bennett Feb 26 '12 at 19:36
add comment

As well as changing permissions, check the ownership of the directory/file. You may run into problems if WordPress is running as a different owner that the FTP account.

share|improve this answer
add comment

Please refer here for how to change permissions, and which folders should be set to which permissions:

http://codex.wordpress.org/Hardening_WordPress#File_Permissions

It is never a good idea to set a folder/file to anything more permissive than 755, especially if it's public facing.

If you have shell access use the chmod command, if you're using SFTP/FTP then you can set the permissions using your FTP client, refer to the manual or help documentation of your FTP client for instructions. Most programs will have this option when right clicking on a remote folder/file.

If you are unable to modify the permissions, contact your administrator/support, or if you're in a shell, try sudo

share|improve this answer
add comment

To easily change permissions, use FTP. See Filezilla and FTP Clients « WordPress Codex.

From http://codex.wordpress.org/Changing_File_Permissions - under no circumstances should any directory be 777:

No directories should ever be given 777, even upload directories. Since the php process is running as the owner of the files, it gets the owners permissions and can write to even a 755 directory.

In some cases, you may need to toggle a directory to 777 to upload one image before changing back to 755.

And see http://codex.wordpress.org/Hardening_WordPress for more security info on file/folder permissions.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.