[Zope] Permission for packing database

Paul Winkler pw_lists@slinkp.com
Fri, 1 Aug 2003 11:58:37 -0400


On Fri, Aug 01, 2003 at 04:10:06PM +0100, Marc Burgauer wrote:
> I would like to set up a CRON job to daily pack a Zope database. The
> application does some heavy text processing and consequently the database
> can grow half a gig per day just because of keeping all the transactions,
> while the data to keep is just a few megs.
> 
> Because I have to type the password in clear text into the script for CRON
> (I intend to use wget), I'd like to create a user with a dedicated role that
> can do nothing, but do the packing. I could not find which permission is
> required for this.
> 
> Can anybody tell me what the minimum privileges are for packing the
> database?

Doesn't look like there's any special permissions declared for packing,
so if your user can view the Control_Panel you are probably good to go.


> OR can the superuser account be used for this?

I'd use  a local role. Create a Script that just does something
like (untested):

cp = container.restrictedTraverse('/Control_Panel')
cp.Database.manage_pack()

Give this script the Manager proxy role, and then add a local role
for your dedicated user, giving them Manager access to only this script.

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's SOLDIER STOOL!
(random hero from isometric.spaceninja.com)