0

If, as answered before, when using fopen() to write a non-existing file, without specifying its permissions, default OS permissions/umask are used to determine the new file's permissions... is it possible to retrieve such default permissions via PHP ?

If PHP is running as an Apache submodule, will using for example umask(null) give me the umask for the Apache user in that system ?

Thank you

Jaume Mal
  • 546
  • 5
  • 21
  • 1
    `umask() sets PHP's umask to mask & 0777 and returns the old umask. When PHP is being used as a server module, the umask is restored when each request is finished.` Quoted from https://www.php.net/manual/en/function.umask.php – Markus Zeller May 22 '23 at 14:00

0 Answers0