What rights do you usually set for uploaded images folder. Is normally 777 or 775?
I usually set 755 for image folders.
I can confirm 755 is the best solution to use for image folder.
I don't think 775 will work, if he is uploading files to this folder via a web based script such as PHP. You have to use 777 so the script has written permissions to upload images/files to that folder.
That is why I put this question. I have a sharing hosting and I set 775. Until last week everything worked for half year. But last week stoped and it says failed to open stream: Permission denied in...
So why it suddenly stopped working? I have never had any problems before on different hosting with 775 and image upload script. Will be a site less secure if I set to 777 now?
If your hosts have implimented phpsusex you will need to use 755 from memory. They should have notified you of the change.
With 775 I thought 755.
Rubble the thing is I used 755 before and now doesn't work anymore, so it is a reverse case. Is this my fault because I haven't used 777 from starting or their mistake because they didn't notify me? Should be used 777 from starting or only once 755 stoped working? I need to know that because my client is saying that is my fault.
thanks a lot!
The answer to this question really depends on your server setup, specifically how apache is run...
If apache is run by the user who owns the folder, then 755 will suffice.
If apache is run as a different user to the one who owns the folder, but is a member of the same user group, then 775 will suffice.
If apache is run as a different user and is not in the same user group as the folder owner..... 777.
755 is the best for uploads. It really depends on your hosting company. Most hosting companies should have suPHP installed on their servers to prevent permission problems, if you're uploading via web you might get 999 (nobody).
(i'm still half asleep if the above response doesn't make sense)
i have a related topic (but specific to wordpress) here: http://www.sitepoint.com/forums/showthread.php?t=716627