K
Kishore
Hi..
I am having trouble with permissions when creating files throught the
perl program.
When I run the perl program through http, it creates files with
permissions 0600.. but if I run the same program through shell, the
files are created with 0644 permission.
I am not sure if this is the correct group to request help from.
here is the code I am using..
use Fcntl ':flock'; # import LOCK_* constants
open(LOG, ">>$LOG_FILE") or die "Cannot open logfile '$LOG_FILE' for
writing: $!";
flock(LOG, LOCK_EX);
seek(LOG, 0, 2);
print LOG "this is the line \n";
flock(LOG, LOCK_UN);
close(LOG);
Thanks in advance for your help.
Kishore.
I am having trouble with permissions when creating files throught the
perl program.
When I run the perl program through http, it creates files with
permissions 0600.. but if I run the same program through shell, the
files are created with 0644 permission.
I am not sure if this is the correct group to request help from.
here is the code I am using..
use Fcntl ':flock'; # import LOCK_* constants
open(LOG, ">>$LOG_FILE") or die "Cannot open logfile '$LOG_FILE' for
writing: $!";
flock(LOG, LOCK_EX);
seek(LOG, 0, 2);
print LOG "this is the line \n";
flock(LOG, LOCK_UN);
close(LOG);
Thanks in advance for your help.
Kishore.