Curt, et al --

...and then Curt Zirzow said...
% 
% Message-ID: <[EMAIL PROTECTED]>

Mister Underhill, I presume? :-)  I only just noticed this :-)


% 
% * Thus wrote David T-G ([EMAIL PROTECTED]):
% > 
% > 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.
...
% > 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 just tried it and

  print "UMASK IS .".`umask`.".<br>\n";

gives me

   UMASK IS .0117 .

which certainly seems right.


% 
% I bet its '11'. I'm not sure how your system is configured but it

I don't get it...  Why would you think that?  The file as it uploads is
mode 600 == umask 177; the file as dropped into place is 666 == 111.
Nothing like a mask of 11 (which would leave us a mode of 766) has shown
up...


% seems the user apache is running under has that umask set that way
% which, IMO, is a bad thing (tm).

I am inclined to agree.


% 
% 
% 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


:-D
-- 
David T-G                      * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/      Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to