move_uploaded_file, umask, and permissions

From: David T-G (davidtg-php_at_justpickone.org)
Date: 11/30/03


Date: Sat, 29 Nov 2003 21:44:14 -0500
To: PHP General list <php-general@lists.php.net>


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!