* Thus wrote David T-G ([EMAIL PROTECTED]): > 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?
I believe it does, move_uploaded_file() uses the current envirionment's umask which seems to be set at an awkward stage. what is the output of: echo `umask`; I bet its '11'. I'm not sure how your system is configured but it seems the user apache is running under has that umask set that way which, IMO, is a bad thing (tm). Curt -- If eval() is the answer, you're almost certainly asking the wrong question. -- Rasmus Lerdorf, BDFL of PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php