note 97179 added to function.tempnam
| From: | anthon at piwik dot org | Date: | Tue, 06 Apr 2010 23:20:20 +0000 |
| Subject: | note 97179 added to function.tempnam | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-167743@lists.php.net to get a copy of this message | ||
The file created by tempnam() will have file permissions that reflect the current umask applied to
the default (e.g., 0600 or -rw-------). This is the case whether the umask is set before starting
the web server process, or set by an earlier call to PHP's umask() function.
For example, if the current umask is 0022, the temporary file is created with permissions 0600
(read/write by owner).
Also, if the current umask is 0222, the temporary file is created with permissions 0400 (read-only
by owner). (This is problematic if your code then tries to open the temporary file for writing.)
It's important to remember that the umask revokes permissions. In neither of the above
examples are the group, other, or execute permissions set.
See: umask(), chmod().
----
Server IP: 69.147.83.197
Probable Submitter: 216.99.58.23 (proxied: 99.228.249.231)
----
Manual Page -- http://www.php.net/manual/en/function.tempnam.php
Edit -- https://master.php.net/note/edit/97179
Del: integrated -- https://master.php.net/note/delete/97179/integrated
Del: useless -- https://master.php.net/note/delete/97179/useless
Del: bad code -- https://master.php.net/note/delete/97179/bad+code
Del: spam -- https://master.php.net/note/delete/97179/spam
Del: non-english -- https://master.php.net/note/delete/97179/non-english
Del: in docs -- https://master.php.net/note/delete/97179/in+docs
Del: other reasons-- https://master.php.net/note/delete/97179
Reject -- https://master.php.net/note/reject/97179
Search -- https://master.php.net/manage/user-notes.php