move_uploaded_file, umask, and permissions
| From: | David T-G | Date: | Sun, 30 Nov 2003 02:44:14 +0000 |
| Subject: | move_uploaded_file, umask, and permissions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-171382@lists.php.net to get a copy of this message | ||
Hi, all --
I have set my umask to 117 (and I change it when making a directory) and
I use move_uploaded_file to handle submitted files.
The temporary file is mode 600 when it lands in /var/tmp but somehow gets
changed to 666 during the move. It seems that move_uploaded_file changes
the file perms and yet does not honor the umask.
Must I really run chmod() on every move_uploaded_file() I process? Isn't
there a better way?
TIA & HAND
:-D
--
David T-G * There is too much animal courage in
(play) davidtg@justpickone.org * society and not sufficient moral courage.
(work) davidtgwork@justpickone.org -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/ Shpx gur
Pbzzhavpngvbaf Qrprapl Npg!