[Zope] Changing file ownership

Daryl Tester dt@picknowl.com.au
Thu, 06 Apr 2000 11:31:32 +0930


Eric Shuman wrote:

> Using an external python method I am trying to change the group ownership
> of a directory on a Red Hat 6 server.

The problem is most likely one of permission.  If the Zope server is
started as the root user, it will change its UID to nobody, and I'd
wager that 'nobody' doesn't have permission to -

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

The files and directories in this path would have to be owned by
nobody for this to succeed (which would account for why it's working
when you execute it from the command line).  If you can't do that,
then you may need to write a setuid program/script to perform this
task as the person who owns the files/directories (something the
other P language does with its setuid interpreter).


Regards,
  Daryl Tester