Brian,
Had a look at safe mode, it shouldn't affect what we're doing.
The chmod I had left in there merely sets the directory permissions. 0755 directory root (read/write/execute), local(read/execute), global (read/execute).
The files were not affected since they are static, we just need permissions to write the file to the folder.
In the PHP manual there was concern from one user that chmod didn't work whilst in safe mode:
http://www.php.net/manual/en/function.chmod.php
But I shall find out for sure.
You should not need to change from 0755 for the purpose of creating directories. Some providers will set 0777 as a security flaw and will block writing to the folder (mine does this), so using 0777 may actually prevent it from working.
Does this still happen under 0755?
Let me know.
Cheers
David K