Webhosting and file permissions woe in PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
LonelyProgrammer
Forum Contributor
Posts: 108
Joined: Sun Oct 12, 2003 7:10 am

Webhosting and file permissions woe in PHP

Post by LonelyProgrammer »

Hi all,

I have this issue with different web-hosting, particular upload scripts which can only upload to a folder only if it has 777 permission (which is risky). On the test server (on a different webhost), 755 works well.

On another web-hosting, log files generated by PHP file functions cannot be writen to some times, but other files are mysteriously unaffected (for instance, the log files for the entire week is 655, and they work well, but just today's log-file doesn't work unless it is set to 777).

I am more of an application developer than a server backend expert, so these behaviours puzzle me to no end. Why are they happening? What can be done?
Post Reply