The Problem
Downloading update from http://wordpress.org/wordpress-3.0.1.zip…
Unpacking the update…
Could not create directory.: /directory/to/website/wp-content/upgrade/wordpress-3.tmp
Installation Failed
I installed WordPress through a web host administrator panel/program (such as Fantistico)
If you have installed WordPress through an admin interface from your web host- then the updates will likely need to be done through their interface, you might not have the power to go around changing permissions. Thus, this article is not for you! Good luck!
But I’ve upgraded WordPress loads of times, using the automatic uploader?
Yes, so did I before I stumbled across this problem. It seems that with the advent of WordPress 3.0, changes needed are more than just bugs fixes and minor content addition. Thus the requirements of your permissions needing to be absolutely correct becomes an issue, one that determines whether you will be able to upgrade through the WordPress administrator interface or not.
Get on with it then! How do we fix it?
For most people the exact cause of the error is slightly different, but boils down to the user account used to update WordPress not having the correct privileges. Go to the root folder of WordPress, and give the uploading user permissions to read, write and execute. So you would type in something along the lines of : sudo chown -R username /path/to/wordpress/ . Obviously this assumes the current owner has the correct read, write and execute privileges.
However, if you’ve made the Apache or your webserver daemon/user as owner of WordPress. I would recommend change the owner to a different account, and give Apache access to read & execute through GROUP permissions. If you don’t want to change the owner of the folder, then what might be advisable to do is make your upload user a member of a new permission group, and allow the user account (used for WordPress uploading/updating) priviliges to read, write and execute.
Once you have changed the permissions, try again & hopefully WordPress will update!
It works! But then I get different errors…
Double check all of the permissions. Navigate to the problem directory, and ensure the directory has rwx permissions for your uploading user. If not, fix it and try again.
For me, I still had problems. Even though the files and directories were all correctly set, it still had problems writing files to my WordPress directory. If you’re absolutely sure that your file permissions are all working, proceed with the following.
Uploading Method
Turns out it was still an issue of permissions, but it stemmed from a different location. What method are you using to upload the data to your server? Check the configuration files for the daemon, and see if you have correctly set the upload permissions.
For example, I was using vsftpd (Very Secure File Transfer Protocol Daemon) at the time of upgrading my WordPress and in the configuration file I had set the file permissions mask incorrectly! I navigated to my vsftpd.conf file, and checked its local_umask value. I had messed up the upload (file permission) mask – I had set it to the permissions I wanted the file to have, not the correct corresponding mask values. No idea how that issue didn’t flag up before the WordPress debacle.
If you use vsftpd as well, edit /etc/vsftpd.conf (with root user privileges!) and find the section of the file that looks like this:
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd’s)
local_umask=077
That would force the user’s FTP permissions to be 700 (rwx for the owner only), which in my situation works, but you’ll want to change the mask for how your server operates.
Hope this saves you some of your (remaining) sanity!
Current Mood:
Abashed
Offload this yammering idiot: