File permission mask in fwrite
After I create a file using fwrite() method, the file permission mask is set to something other than what I need it to be. Is there anyway that I can set a certain permission mask prior to the creation of the file using PHP? Does any of the php.ini settings need to be changed?
- I usually perform file/directory permission masking by running chmod command in exec() function. So httpd becomes the owner of the file. I was wondering if there is any option in PHP File I/O module.
Sorry I didn't make myself clear enough.
P.S. Apache is running PHP as a module.