in reply to Re: Re: Setting permissions as text file is created
in thread Setting permissions as text file is created
Intuitively I think that is what I would have guessed but I was hoping someone would suggest a way of ammending my code in a way that included permissions in the open filehandle line.
Then, like the other poster suggested, play with umask. On my system, its default value is 2, creating plain files with permissions 0664. If you were to (temporarily) set it to 0, the file created should have permissions set to 0666. It does for me.
my $umask = umask 0; open (FILEHANDLE, ">>$filepath")||&ErrorMessage; umask $umask; print FILEHANDLE "$pageoutput"; close FILEHANDLE;
|
|---|