Loading ...
Sorry, an error occurred while loading the content.

File permission mask in fwrite

Expand Messages
  • Rubayeet Islam
    Hello, 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
    Message 1 of 3 , Nov 3, 2008
    • 0 Attachment
      Hello,

      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?
    • shiplu
      fwrite has no umask option. what function you are using for masking?? who is running the php file?? is it apache as a module or from cli? -- A K M Mokaddim
      Message 2 of 3 , Nov 4, 2008
      • 0 Attachment
        fwrite has no umask option.
        what function you are using for masking??
        who is running the php file?? is it apache as a module or from cli?

        --
        A K M Mokaddim
        http://talk.cmyweb.net
        http://twitter.com/shiplu
        Stop Top Posting !!
      • Rubayeet Islam
        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
        Message 3 of 3 , Nov 4, 2008
        • 0 Attachment
          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.
        Your message has been successfully submitted and would be delivered to recipients shortly.