ghosthider has asked for the wisdom of the Perl Monks concerning the following question:
Hi there, Monks-
I've put together an installation script that needs to run on a wide range of Unix servers. The problem is that, on some servers, I get a 'permission denied' error when it tries to set permissions on the files and folders I upload along with it.
Here's how I'm setting permissions:
my $file = 'foo.txt'; chmod 0755, $file or die "Can't chmod $file: $!"
The files the script sets permissions on will only be accessed by the script itself. Also, just about all of them are empty and will be written to later.
What's the best way to (programmatically) ensure the script can write to the files on a wide variety of Unix servers?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Successfully accessing files
by sgifford (Prior) on Apr 30, 2007 at 22:48 UTC | |
by Anonymous Monk on May 01, 2007 at 04:27 UTC | |
by sgifford (Prior) on May 01, 2007 at 05:13 UTC | |
|
Re: Successfully accessing files
by Anonymous Monk on Apr 30, 2007 at 22:18 UTC |