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.
jelas pasti akan error mas, kalau pake suexec, folder itu harus dibuat sebagai milik user biasa, bukan httpd,
solusi singkat, di chown -R user.user namafolder
pake cronjob script bisa juga, tapi ngga akan berhasil 100%
kalau dari saya, coba buat user baru, yang levelnya rendah, terus jalanin si situs dari dalam direktori mereka, misal /home/username/public_html dan perbaiki httpd.conf agar jalan dengan suexec, chmod si folder yang mau di writablenya itu ke 777, terus pasang suhosin, it works, tp ga tau kalo di tempatnya mas, lum pernah masuk
Thanks for sharing. This save me some times.
I’ve never have picture uploading problem since I upgrade to 2.5…
Cheers 🙂
it’s not about the suexec, try to change owner and chmod the folder
Well yes, this is one method which can solve the upload problem. If it is the problem with suexec. The prob can be so many things. as Free ebook mentioned the owner and chmod folder needs to be checked. Anyway, good tip. Appreciate the work.
Interesting article. Nowadays new bloggers have many resources to solve their problems. I wish I had such help when I started blogging. this article is one useful resource for newbies. Nice work. Keep it up.
Ohh man. finally. Thanks a bunch for the solution. I’ve been having this problem for weeks now. and this sorted it out. Thanks again. Your a life saver
I was searching this .Thanks for sharing ,I tried this it’s working good ..
Bingo, worked like a charm, thanks! One of my sites was having this issue for 2 months. I never had thought it was my web host that caused the issue.
Process running, the php/server (chmod 777) works properly on some server installations. However, any directory whose permissions have been set to ‘777’ present a (real) security hole: a malicious visitor could upload a script to that directory and hack your site… Thank you.
Nowadays new bloggers have many resources to solve their problems. I wish I had such help when I started blogging.
The prob can be so many things. as Free ebook mentioned the owner and chmod folder needs to be checked. Anyway, good tip. Appreciate the work.
The prob can be so many things. as Free ebook mentioned the owner and chmod folder needs to be checked. Anyway,
I wish I had such help when I started blogging. this article is one useful resource for newbies. Nice work. Keep it up.
The prob can be so many things. as Free ebook mentioned the owner and chmod folder needs to be checked.
The prob can be so many things. as Free ebook mentioned the owner and chmod folder needs to be checked. Anyway, good tip. Appreciate the work.
If it is the problem with suexec. The prob can be so many things. as Free ebook mentioned the owner and chmod folder needs to be checked. Anyway, good tip. Appreciate the work.
whose permissions have been set to ‘777′ present a (real) security hole: a malicious visitor could upload a script to that directory and hack your site… Thank you.
Success usually comes to those who are too busy to be looking for it.
suExec is a module for Apache webserver that makes it more secure.