Image Dir Permission Problem Fix !

I just wanted to share my exp with my site and moving it to another host …



I moved my whole site to another host and started having Problem with the Images dir.



i was getting these errors…


[QUOTE]Warning: copy(/home/xxxxx/public_html/images/detailed/xxxxx_800.jpg) [function.copy]: failed to open stream: Permission denied in /home/xxxxx/public_html/core/fn.images.php on line 104

[/QUOTE]

so i found this article :



[url]CS-Cart Documentation — CS-Cart 4.15.x documentation



i tried setting all the dir permissions to 777 like outlined using terminal access on a unix box…



doing this helped and the errors went away … however everyday i would start having the errors again … i noticed that the permission was switching back to 755.

so i opened a support ticket with my host… this is what they told me …




[QUOTE]

PHP in server is running as DSO(Dynamic shared object)



In this php runs as user nobody.



Giving 777 permissions make files or directories world writable and your accounts will be accessable to all.

This will create a potential security risk.



I have changed the permissions to 775 and ownership to user.nobody



I logged into server via hardware node.



Logged into your server. I ran the below commands via shell,



cd /home/xxxxxx

chown xxxxxx.nobody public_html/ -R

pwd

chmod 775 public_html/ -R[/QUOTE]



this has fixed our problem and our files are now 755…



just thought i would post this incase someone else runs into this …