[ZODB-Dev] [ZODB 3.8/Blob] Error in rename_or_copy_blob()

Andreas Jung lists at zopyx.com
Tue Apr 27 06:31:34 EDT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Could this be related to

https://bugs.launchpad.net/zodb/+bug/224169

?

Andreas

Jim Fulton wrote:
> On Mon, Apr 26, 2010 at 6:34 AM, Andreas Jung <lists at zopyx.com> wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Hi there,
>>
>> a customer site is running Plone 3.3 w/ plone.app.blob.
>>
>> While creating a 'File' instance we get the following error:
>>
>> 2010-04-26T13:17:07 ERROR Zope.SiteErrorLog 1272277027.360.157502129415
>> http://www.deisa.eu/test-project/conversions/@@generate/generate
>> Traceback (innermost last):
>>  Module ZPublisher.Publish, line 125, in publish
>>  Module Zope2.App.startup, line 238, in commit
>>  Module transaction._manager, line 93, in commit
>>  Module transaction._transaction, line 325, in commit
>>  Module transaction._transaction, line 432, in _commitResources
>>  Module ZODB.Connection, line 762, in tpc_finish
>>  Module ZEO.ClientStorage, line 1088, in tpc_finish
>>  Module ZEO.ClientStorage, line 1134, in _update_cache
>>  Module ZODB.blob, line 772, in rename_or_copy_blob
>> IOError: [Errno 13] Permission denied:
>> '/home/plone/Plone/zeocluster/var/blobstorage/0x00/0x00/0x00/0x00/0x00/0x07/0x4c/0xf0/0x0385b9291ea836aa.blob'
>>
>> The Plone processes is running as user 'plone' (nothing related to
>> setuid/effective-user) and all files and directories are owned by
>> 'plone'. I could even create a new file from the debugger inside
>> rename_or_copy_blob() inside the
>> /home/plone/Plone/zeocluster/var/blobstorage/0x00/0x00/0x00/0x00/0x00/0x07/0x4c/0xf0
>> directory.
>>
>> The related code in blob.py is:
>>
>> 759 def rename_or_copy_blob(f1, f2, chmod=True):
>> 760     """Try to rename f1 to f2, fallback to copy.
>> 761
>> 762     Under certain conditions a rename might not work, e.g. because
>> the target
>> 763     directory is on a different partition. In this case we try to
>> copy the
>> 764     data and remove the old file afterwards.
>> 765
>> 766     """
>> 767     try:
>> 768         os.rename(f1, f2)
>> 769     except OSError:
>> 770         copied("Copied blob file %r to %r.", f1, f2)
>> 771         file1 = open(f1, 'rb')
>> 772         file2 = open(f2, 'wb')
>>            ^^^^^^^^^^^^^^^^^^^^^^^
>> 773         try:
>> 774             utils.cp(file1, file2)
>> 775         finally:
>> 776             file1.close()
>> 777             file2.close()
>> 778         remove_committed(f1)
>> 779     if chmod:
>> 780         os.chmod(f2, stat.S_IREAD)
>>
>> Is this a known problem
> 
> No.
> 
>> and how can this be fixed.
> 
> I have no idea, and have no idea how to reproduce it.
> 
> Jim
> 


- -- 
ZOPYX Limited           | zopyx group
Charlottenstr. 37/1     | The full-service network for Zope & Plone
D-72070 Tübingen        | Produce & Publish
www.zopyx.com           | www.produce-and-publish.com
- ------------------------------------------------------------------------
E-Publishing, Python, Zope & Plone development, Consulting


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkvWvQYACgkQCJIWIbr9KYzm/ACggwZqZ9A0ZLIp8Bn7KhrHijVw
FMsAn1cUdMobgNBVnSMhX05sZC2lIDjn
=iKs1
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lists.vcf
Type: text/x-vcard
Size: 316 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zodb-dev/attachments/20100427/b89678c7/attachment.vcf 


More information about the ZODB-Dev mailing list