[Zope] Re: Re: Changing file ownership

Daryl Tester dt@picknowl.com.au
Fri, 07 Apr 2000 08:44:01 +0930


Eric Shuman wrote:

> The weird part here is that the python method had just created the
> directory in question and the UID on that file is "nobody".

Eek!  And you've caught me with my morning brain, so my answers may
be sub-optimal, but here goes.  :-)  Forget the setuid stuff; this
situation doesn't call for it.

> What kinds of problems would be associated with changing the group
> to something other that root?

Depends on who wants access to that directory :-), and what the
group permissions are, but that shouldn't cause you the problem
you're seeing now.

>> os.system('chgrp -R extranet /web/htdocs/clients/test')

Firstly (assuming GNU chgrp, or your platform chgrp supports -v),
try:

os.system('chgrp -v -R extranet /web/htdocs/clients/test >> /tmp/helpme 2>&1')

Invoke your method, then check /tmp/helpme for results.

Secondly, you should be checking that os.system is returning successfully,
and if not, raising an error (just in case it can't find chgrp).


Regards,
  Daryl Tester