When I try to upload images from wordpress, I get an error such as:
Unable to create directory /var/www/vhosts/site.com/httpdocs/wp-content/uploads/2008/01. Is its parent directory writable by the server?
I’m running WP2.3 on Linux. It’s my box (so I have root access), and I’m using Plesk to manage web sites (which has a few quirks but is mostly OK). I’m using PHP 5.04 and safemode is off.
The uploads directory (ie wp-content/uploads) is mode 777. When wordpress tries to upload a file, it successfully creates the first directory of the date hierarchy (ie ‘2008’). This directory is also mode 777, user/group is apache.
However, wordpress is subsequently unable to create the next down directory (ie ’01’). If I manually change the owner of the ‘2008’ directory to the user of the v-host which wordpress is running under, and try the upload again, WordPress successfully creates the ’01’ directory (mode 777, user/grp apache) and now fails to upload the file with error:
The uploaded file could not be moved to /var/www/vhosts/site.com/httpdocs/wp-content/uploads/2008/01
What’s going on? WordPress is creating directories with the user and group of the apache server (as expected), AND those directories are mode 777, but then it can’t create directories or files underneath. (yet I can create a directory there myself on the command line with any user, so mode is definitely 777).
Is there some apache or PHP setting that might be causing this?
Any pointers gratefully received.
- The topic ‘Permissions/problems uploading images’ is closed to new replies.