Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hello all. I am trying to run chmod (and check for failures), using PERL. The chmod returns 1, but the permissions reported are different than the ones reported after using LINUX's chmod. I have used perl -e to show the inconcictency. See below:
> perl -e '$m= chmod (777 , "run.debug.2.log") ; print "$m\n";' 1 > ls -ltr run.debug.2.log -r----x--x 1 ldagan contract 0 Nov 22 08:59 run.debug.2.log > chmod 777 run.debug.2.log > ls -ltr run.debug.2.log -rwxrwxrwx 1 ldagan contract 0 Nov 22 08:59 run.debug.2.log
As can be seen, chmod 777 in PERL gives permsissions "-r----x--x", which is different than the LINUX equivalent. Any ideas?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: PERL chmod inconsistent with the LINUX equivalent
by marto (Cardinal) on Nov 22, 2012 at 09:28 UTC | |
by ColonelPanic (Friar) on Nov 22, 2012 at 10:12 UTC | |
by marto (Cardinal) on Nov 22, 2012 at 10:23 UTC | |
by ColonelPanic (Friar) on Nov 22, 2012 at 10:30 UTC | |
by marto (Cardinal) on Nov 22, 2012 at 11:02 UTC | |
Re: PERL chmod inconsistent with the LINUX equivalent
by moritz (Cardinal) on Nov 22, 2012 at 09:40 UTC |
Back to
Seekers of Perl Wisdom