I am still a newbie and today I tried to pack my ZODB, but that's not working. Turning debugging on doesn't help much: 2003-07-31T15:18:36 ERROR(200) ZODB packing Traceback (innermost last): File /usr/share/zope/zope-2.6.1/lib/python/ZODB/DB.py, line 499, in pack File /usr/share/zope/zope-2.6.1/lib/python/ZODB/FileStorage.py, line 1496, in pack (Object: /var/lib/zope/zope-2_6_1/var/Data.fs) IOError: [Errno 13] Permission denied: '/var/lib/zope/zope-2_6_1/var/Data.fs' How is it possible that I can edit my ZODB just fine (through plone), but I cannot pack it? Apparently, it fails on attempting to open Data.fs for reading (i.e. file=open(name, 'rb')). The file is owned by user zope and group zope-2_6_1, with rw permissions for both. Any ideas? I am stumped! -- Denys Duchier - Équipe Calligramme - LORIA, Nancy, France
Are you starting your Zope as the root user? If so, Zope 2.6 doesn't deal with this very well, as it opens a bunch of files as root, incuding the database, then switches users during startup to another user. As long as the files are kept open everything works ok, but as soon as one of them is closed and you try to reopen it, it blows up. You can fix this in one of two ways: - start Zope as the root user but provide the -u switch to switch to the "right" user (zope in your case). - start Zope as a nonroot user and change file/directory permissions as necessary (recommended). FWIW, Zope 2.7 fixes this issue by not writing any files until it has setuid'ed. On Thu, 2003-07-31 at 09:31, duchier@ps.uni-sb.de wrote:
I am still a newbie and today I tried to pack my ZODB, but that's not working. Turning debugging on doesn't help much:
2003-07-31T15:18:36 ERROR(200) ZODB packing Traceback (innermost last): File /usr/share/zope/zope-2.6.1/lib/python/ZODB/DB.py, line 499, in pack File /usr/share/zope/zope-2.6.1/lib/python/ZODB/FileStorage.py, line 1496, in pack (Object: /var/lib/zope/zope-2_6_1/var/Data.fs) IOError: [Errno 13] Permission denied: '/var/lib/zope/zope-2_6_1/var/Data.fs'
How is it possible that I can edit my ZODB just fine (through plone), but I cannot pack it? Apparently, it fails on attempting to open Data.fs for reading (i.e. file=open(name, 'rb')). The file is owned by user zope and group zope-2_6_1, with rw permissions for both.
Any ideas? I am stumped! -- Chris McDonough <chrism@zope.com> Zope Corporation
Chris McDonough <chrism@zope.com> writes:
- start Zope as the root user but provide the -u switch to switch to the "right" user (zope in your case).
That is exactly what I do. It turns out that my Gentoo installation of zope had created the latter in group users rather than zope-2_6_1. Changing that fixed the problem, although I do not precisely understand why (user permissions should have been sufficient - and clearly they where for all operations other than packing - I am still puzzled). Cheers, -- Denys Duchier - Équipe Calligramme - LORIA, Nancy, France
participants (2)
-
Chris McDonough -
duchier@ps.uni-sb.de