[Zope] Cannot pack Data.fs, Permission Denied error
Jon Whitener
wmmail at twmi.rr.com
Thu Sep 4 18:09:33 EDT 2003
Solved!
I created a 'zope' group (this is on Linux), and added to the group both root and zopeUser (my -u user). (Whether root really needed to be added to the group, I don't know.)
Next, I set the group name to zope for the $ZOPEDIR/var directory and everything in it:
chown :zope var
chown :zope var/*
Then changed permissions to allow members of the zope group to write var and its contents:
chmod g+w var
chmod g+w var/*
I stopped and restarted Zope and VIOLA: I was able to pack my morbidly obese 40MB ZODB to a spindly 5.8MB! I am happy!
(Interestingly, after packing the ZODB, the group of the Data.fs file and Data.fs.index reverted to 'zopeUser'. Nonetheless, I was able to pack again without error.)
Thanks,
Jon
At 9/4/2003 03:45 PM, Chris McDonough wrote:
>Hi John,
>
>Change the permissions of the var dir and all of its its contents to be
>writable by the -u user. Then start Zope as root with the -u switch.
>That should solve the problem.
>
>This problem is a symptom of the way Zope 2.6 and prior handle UNIX
>setuid wrt log files and database files. Zope 2.7 handles it
>differently and does not have this problem.
>
>- C
>
>
>On Wed, 2003-09-03 at 18:09, Jon Whitener wrote:
>> I (still) cannot pack my ZODB via the Web. This has been vexing me for months. I get this error:
>>
>> Error Type: IOError
>> Error Value: [Errno 13] Permission denied: '$ZOPEDIR/var/Data.fs'
>>
>> I am running Zope on port 80, so I changed the ownership of the $ZOPEDIR/var directory to root. Zope is started as root, but with the "-u zopeUser" option (yet the first zope process is still owned by root (see below) is that right?).
>>
>> Are there some other permissions I need to change to be able to pack the database via the Zope Management Interface? (Changing all the contents of var to root ownership did not fix.) Here are my data:
>>
>> [root at zopeServer var]# ls -ld
>> drwx--x--T 3 root root 4096 Sep 3 17:44 .
>>
>> [root at zopeServer var]# ls -l
>> total 173148
>> -rw------- 1 zopeUser zopeUser 41630547 Sep 3 16:37 Data.fs
>> -rw-r--r-- 1 zopeUser zopeUser 7909 Jun 12 2002 Data.fs.in
>> -rw------- 1 zopeUser zopeUser 56779 Mar 24 10:21 Data.fs.index
>> -rw------- 1 zopeUser zopeUser 5 Sep 3 17:05 Data.fs.lock
>> -rw------- 1 zopeUser zopeUser 6156144 Feb 26 2003 Data.fs.old
>> -rw------- 1 zopeUser zopeUser 0 Sep 3 17:05 Data.fs.tmp
>> -rw------- 1 zopeUser zopeUser 1355646 Sep 3 17:07 event.log
>> -rw------- 1 zopeUser zopeUser 5 Sep 3 17:05 pcgi.pid
>> srwxrwxrwx 1 root root 0 Sep 3 17:05 pcgi.soc
>> -rw-r--r-- 1 root root 0 Nov 5 2002 startup.log
>> -rw-r--r-- 1 root root 127879170 Sep 3 17:21 Z2.log
>> -rw------- 1 zopeUser zopeUser 6 Sep 3 17:05 Z2.pid
>>
>> [root at zopeServer var]# ps -aux
>> [...EDITED...]
>> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
>> root 17816 0.0 0.6 4404 3400 ? S 17:41 0:00 /zope/bin/python /zope/z2.py -w 80 -u zopeUser
>> zopeUser 17837 0.4 2.8 48352 14400 ? S 17:44 0:02 /zope/bin/python /zope/z2.py -w 80 -u zopeUser
>> zopeUser 17838 0.0 2.8 48352 14400 ? S 17:44 0:00 /zope/bin/python /zope/z2.py -w 80 -u zopeUser
>> zopeUser 17839 0.0 2.8 48352 14400 ? S 17:44 0:00 /zope/bin/python /zope/z2.py -w 80 -u zopeUser
>> [...etc...]
>>
>> Thanks in advance,
>>
>> Jon Whitener
>> Detroit, Michigan USA
>>
More information about the Zope
mailing list