in reply to chmod changes on server when script runs

Another approach, perhaps more 'correct' in the views of some, would be to do the following
use Fcntl qw(O_RDWR O_CREAT); sysopen(TEMP,"external_file.txt.tmp",O_RDWR|O_CREAT,755);
insted of the normal open.
This has the effect of precreating the file with the correct permissions.

You may also want to check the umask function in perlfunc aswell.

Also of some importance, especially I expect, is the flock function, which you may also w ant to read about.

-nuffin
zz zZ Z Z #!perl

Replies are listed 'Best First'.
Re: Re: chmod changes on server when script runs
by Donnie (Acolyte) on Oct 15, 2002 at 20:44 UTC
    Thanks once more for your words of wisdom. I am learning by great gobs and leaps! Great day when I found the Monastery!