[Zope] Re: Re: Changing file ownership

Eric Shuman eshuman@outrider.com
Thu, 06 Apr 2000 11:06:55 -0700


The weird part here is that the python method had just created the 
directory in question and the UID on that file is "nobody".  So even though 
the process is the owner of the file it still does not have permission to 
change the GID.   Is there a way to specify what group Zope/Python is 
running under.  What kinds of problems would be associated with changing 
the group to something other that root?

Thanks for you help Daryl,


Eric



 >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

~Eric