var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
Set default file permissions?
Is there a way to set the default file permissions on a linux box?
My php script auto generate and save files and these files have the default permissions of 644 with uid and gid being 'apache'
I want it to be 777 as it is very irritating that i can't delete these files under File Manager in DirectAdmin.
Anyway i can change some setting so any autogenerated files have the 777 permissions?
i want to set a default file permission for ALL files created.
Chmod only set for individual files.
i.e. if i don't explicitly set the permission of the file created, it should have the default value of 777.
so the prob now is: how to set the default value of 777?
I see there is a umask function in php. but i don't really understand how it works.
Do i just enter umask(0) once and all files generated in the script thereafter will have permission 777?
The manual page for umask() suggests that you use chmod() instead, if you are using a multi-threaded httpd. Other then that, umask(0) *should* work. You could make a small test script that creates a few files, and see what the permissions are on them after the script runs.