chmod g+ Equivalent
milan_sanremo
hancock.robert at gmail.com
Tue Aug 14 08:24:11 EDT 2007
On Aug 13, 8:06 pm, Steve Holden <st... at holdenweb.com> wrote:
> milan_sanremo wrote:
> > I've read the documentation on os.chmod() and can implement all the
> > standard commands, but what is the syntax for the equivalent of chmod g
> > + to set the group id?
>
> I assume when you say "to set the group id" you actually mean "to assert
> the setgid bit"? I further presume that when you say "chmod g+" you
> actually mean "chmod g+s".
The g+s was an omission on my part. I can see how it would confuse
the issue.
I'm not sure if I mean "to assert the setgid bit". My SUN docs refer
to it being 'on'.
http://docs.sun.com/app/docs/doc/819-3321/6n5i4b767?l=en&a=view&q=setgid+bit
>
> You can't have read the documentation very thoroughly. It says right at
> the top:
>
> S_ISUID
> S_ISGID
I did see this in the documentation:
Change the mode of path to the numeric mode. mode may take one of the
following values (as defined in the stat module) or bitwise or-ed
combinations of them:
* S_ISUID
* S_ISGID
Which refers to:
http://docs.python.org/lib/module-stat.html
After which it was still unclear.
My question is in the command os.chmod(myDirectory, ?) what is the
value for ? to turn on the setgid bit.
Contrary to your presumption, I did read the documentation
thoroughly. It is inability to understand the concept which prompted
me to post the question here.
>
> Of course, your process needs to have root privilege in order to be able
> to do that.
>
> regards
> Steve
> --
> Steve Holden +1 571 484 6266 +1 800 494 3119
> Holden Web LLC/Ltd http://www.holdenweb.com
> Skype: holdenweb http://del.icio.us/steve.holden
> --------------- Asciimercial ------------------
> Get on the web: Blog, lens and tag the Internet
> Many services currently offer free registration
> ----------- Thank You for Reading -------------
More information about the Python-list
mailing list