[Errno 13] Permission denied, but works after X attempts

Bug #1096737 reported by David D.
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
calibre
Invalid
Undecided
Unassigned

Bug Description

Using Win7 x64 Ultimate. Running calibre after mapped NAS drive, v0.9.13

While updating the library (Title and/or Author(s)), Calibre errors with the following message:

calibre, version 0.9.13
ERROR: Permission denied: Could not change the on disk location of this book. Is it open in another program?

Traceback (most recent call last):
  File "site-packages\calibre\gui2\library\models.py", line 906, in setData
  File "site-packages\calibre\gui2\library\models.py", line 980, in _set_data
  File "site-packages\calibre\library\database2.py", line 2222, in set
  File "site-packages\calibre\library\database2.py", line 2513, in set_authors
  File "site-packages\calibre\library\database2.py", line 666, in set_path
  File "site-packages\calibre\library\database2.py", line 1522, in add_format
  File "site-packages\calibre\library\database2.py", line 1378, in copy_format_to
  File "site-packages\calibre\utils\filenames.py", line 324, in copy_path_to
  File "site-packages\calibre\startup.py", line 156, in local_open
OSError: [Errno 13] Permission denied

If I continue to attempt to change the same fields (IE: highlight, as if to change, just just hit ENTER instead), after a few attempts it finally takes the update. Condition exists if I run app as ADMIN or not. I can manually add/remove/copy files/folders in the same (sub)folders.

Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1096737

Something on your computer is blocking calibre, my guess would be an
antivirus program. Try disabling it, or excluding calibre and the
calibre library folder from it.

 status invalid

Changed in calibre:
status: New → Invalid
Revision history for this message
Susan Barr (susan-barr) wrote :

After disabling the antivirus program I continue to receive this error message. None of the scan logs for the antivirus program correspond to the error messages in Calibre.

Revision history for this message
Snoopy (snoopyf) wrote :

Exactly the same problem for me, using the Calibre GUI version 0.9.39 on Windows x64.

I'm running the Calibre DB on an always-on Ubuntu Server 12.04 LTS (for using the calibre-content-server on (my local/the inter-)net). The Calibre DB is shared via samba and the share is mounted as a drive in Windows 7 x64 where I edit the calibre DB. Adding new eBooks works without a problem but when updating Author or Title in 8 of 10 times I get exactly the same error as Susan. I also tried disabling the AntiVirus Software which didn't help. Also shutting down the calibre-content-server on the Ubuntu Machine while updating the Database didn't help.

The eBook is absolutly NOT opened in any other program when trying to update its Metadata (verified that with "lsof" at the Ubuntu Server and with ProcessExplorer on Windows).

What is more interesting: When using Calibre 0.9.39 at an older Windows XP in exactly the same way as in Windows 7 x64 there are no problems, updating metadata works just fine.

Revision history for this message
Kovid Goyal (kovid) wrote :
Revision history for this message
Steve Albany (strangeplato) wrote :

Kovid,

First, I've been a user of Calibre since day 1. Its made cataloging my sizable ebook collection a snap.

I ran Calibre off a WS GoFlex NAS for YEARS w/o issue, recently flipped over to a BUFFALO LINKSTATION 410 and now I can't add/change anything in the library due to this error.

Can you explain WHY Calibre bombs in this way? Are you trying to force a lock on a directory?

Are you willing to address this issue beyond just telling us not to use a NAS? My ebook library cannot live on a single PC and placing the library on the NAS is the only way to go.

Maybe a NAS-friendly version with your lock scheme disabled?

At this point, for the first time, I might have to cease using Calibre altogether if this situation isn't resolved in some fashion and I would be sad.

Revision history for this message
Steve Albany (strangeplato) wrote :

Some clarification...

After some testing and moving my metadata.db to a local path (to avoid the SQLITE-SMB/CIFS lock issue on the db).

Turns out, I can edit properties all day long.... Its when I change AUTHOR. When it goes to copy/move the book to the new location (the new author name dir) is when I get the above error.

So my conclusion is this isn't a SQLITE issue as the forums might suggest.

Revision history for this message
Kovid Goyal (kovid) wrote :

Networked filesystems are simply broken. They are never going to be supported. If by luck you come across a network filesystem that is broken in a way that does not affect calibre, good for you. If not, then you are out of luck.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.