Re: umask() and chmod()

From: Date: Thu, 15 Apr 2004 16:26:26 +0000
Subject: Re: umask() and chmod()
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-183482@lists.php.net to get a copy of this message
Mike, et al -- ..and then Ford, Mike [LSS] said... % % On 15 April 2004 16:26, David T-G wrote: % % > but chmod() needs a permissions setting rather than a umask. % > % > The challenge is in representing this as octal. With some .. % > to feed to chmod() -- and apparently I can't just % > % > $r = 0.$r ; % % That would be % % $r = '0'.$r; Hmmm... OK. % % I'm not sure, however, that this is a totally foolproof way of doing it, as % it would fail with any permission set (however unlikely) where the owner Would it? Suppose I were setting it to 007; that would be 0007 with the leading zero and should still be fine. % odgit was a zero -- perhaps you should be sprintf()-ing it? Heck, I'll take any advice I can get :-) I think, though, that the problem is that I'm trying to use a string -- if I can get it built correctly in the first place -- as an octal digit. % % Cheers! % % Mike Thanks & HAND :-D -- David T-G davidtg@justpickone.org http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

« previous php.general (#183482) next »