WordPress + suExec = can not upload ?
If you find that you can not upload pictures anymore to WordPress, and the only things that have changed is your webhoster — then your webhoster may have suExec setup on their server.
suExec is a module for Apache webserver that makes it more secure.
Basically, it will execute scripts with its owner’s permission – not Apache’s.
In this case however it can cause problems when uploading, I have posted the details on WordPress forum :
With suExec you’ll still have problems uploading, usually you’ll get the follwoing error message :
The uploaded file could not be moved to /home/myusername/myblog.com/wp-content/uploads/2008/06.
Reason being because WP created that 2008/06 dir as apache’s user (www-data / httpd / etc), but suExec require that dir to be owned by myusername – otherwise the upload will fail.
Changing the directory’s ownership to myusername fix the problem – but on the next month (when WP created the new directory for that month) you’ll encounter this problem again.
A workaround is to setup a cronjob that will fix the permission / ownership of the uploads directory (on WPMU : blogs.dir) automatically on the beginning of every month.
Ideally, this shouldn’t happen, but I haven’t got an idea at all.
Hope it helps someone out there.


