[Tutor] Re:Permissions and other hairpulls

Sean 'Shaleh' Perry shalehperry@attbi.com
Mon May 12 01:11:02 2003


On Sunday 11 May 2003 19:48, Kirk Bailey wrote:
> !$%$^*!
> It worked!
> Hmmm... when I am in the console and issuing commands, chmod 666
> dead.parrot works fine; but when in the program,
> os.chmod('/pathtoparrotcage.dead.parrot',666) barks like a dog- apparently
> python does not like decimal data at all. BUT
> os.chmod('/pathtoparrotcage/dead.parrot',0666) which forces it to interpet
> it as octal expressed information WORKS LIKE A CHARM!
>
> WAHOO! THANKS gang, especially to magnus@thinkware.se for the heads up!
>
>
> Gee, if only the docs or the website had been just a TAD bit clearer about
> this?

on the console chmod ASSUMES the input you gave it was octal so all is well.  
I am so used to it I forgot to mention it, thanks to Magnus for noticing.

Of course, many of us use the g+w notation instead to avoid the numerical 
pitfalls.