[ic] Usertag and permissions on create file

m.mescoli at omnib.it m.mescoli at omnib.it
Fri Sep 19 17:56:13 UTC 2008

m.mescoli at omnib.it ha scritto:
> Perl beginner.
> With an usertag i create a png plot file with umask permission 0660. 
> This permissions do not permits apache to read the file and trasmit it 
> to web clients. How create and write a file inside usertag with read 
> permission for all ?
> Thanks
> Marco Mescoli
Sorry but i don't understand. After more attempts to permit to overwrite 
old file or create a new one and leave it readable:
my $prevumask = umask 0002;
open( GRAPH, "> $GRAPH" ); # file created has -rw-rw-r-- perms octal 0664
close( GRAPH );
umask = $prevumask; # reset file permission
But why setting umask to octal 0002 it create the file with octal 0664 
perms ?

Marco Mescoli

More information about the interchange-users mailing list