I've got a script that outputs a file to the disk. Now I will get a "Permission Denied" unless the directory it writes to is 777.

I thought that since the script was running on the server, it wouldn't need "World write" privileges, but it does. ???

I'm concerned about security - I don't like leaving directories as world writeable (even though I'm not too sure of the implications).

Thanks for the help.