Bob Showalter wrote:
Chris Devers wrote:
Maybe the program is a code generator that produces other files
which should be executable (I can't remember anyone doing this,
but there's no reason why it couldn't be reasonably be done).

Fine, use creation bits of 0777.

Are you saying that

    open FH, "> $file";
    chmod 0777, $file;

is fine, while

    umask 0;
    sysopen FH, $file, O_CREAT|O_RDWR, 0777;

is not? In that case, I'm really confused by now. ;-)

Neither of these require fooling with umask.

If you want to set permission 777 via e.g. sysopen() or mkdir(), you do need to set umask, unless it happens to be 0 to start with.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to