ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-list
python-list
Re: chmod g+ Equivalent
by Milan_sanremo other posts by this author
Aug 13 2007 5:06PM messages near this date
Re: chmod g+ Equivalent | Re: chmod g+ Equivalent
On Aug 13, 6:33 pm, ra...@[...].com (Lawrence Oluyede) wrote:
>  milan_sanremo <hancock.rob...@[...].com> 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?
> 
>  chmod() [1] takes as the second parameter a bitwise or-ed combination of
>  a series of values. If you look at chmod's man page ("man 2 chmod" on
>  the shell) you can see the following values for the group id (I have OSX
>  so the actual value may be different on your OS):
> 
>             #define S_IRWXG 0000070    /* RWX mask for group */
>             #define S_IRGRP 0000040    /* R for group */
>             #define S_IWGRP 0000020    /* W for group */
>             #define S_IXGRP 0000010    /* X for group */
> 
>  So you just have to OR them to accomplish your goal.
> 
I understand that for setting the standard rwx permissions, but how do
these affect the ability to change the setgid bit?  Under Solaris you
cannot do it from the command line in absolute mode, so perhaps it is
not possible in python

I'm trying to get the equivalent of 'chmod g+' not something like
'chmod 755'.

-- 
http://mail.python.org/mailman/listinfo/python-list
Thread:
Milan_sanremo
Lawrence Oluyede
Milan_sanremo
Bjoern Schliessmann
Milan_sanremo

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved