Renaming book throws permission error after using cloudron file manager
-
Hi All, I attempted to upload a number of audiobooks to calibre web using the cloudron file manager, as 1-by-1 via the calibre web interface would have been painstakingly slow.
I downloaded /library to my desktop, opened it with calibre locally, added the audio files, then re-uploaded the entire folder (including metadata.db based on advice from previous threads). Things seemed to be working fine and this process was fairly quick, until attempting to fetch metadata on some books which renamed author and/or title. Calibre web threw this error:
Rename title from: '/app/data/library/Betty Smith/A Tree Grows in Brooklyn (154)' to '/app/data/library/Betty Smith/A Tree Grows in Brooklyn (154)' failed with error: [Errno 2] No such file or directory: '/app/data/library/Betty Smith/A Tree Grows in Brooklyn (154)'
When i look in file manager I can see a duplicate folder with different capitalization, and in calibre the book formats/files I had in the older folder are no longer accessible.
I believe this has something to do with permissions of the calibre web user as I'm seeing a similar error to https://github.com/janeczku/calibre-web/issues/637. I thought this might be related to the specific library folder I uploaded so I restored to a previous backup of calibre-web, however (quite unfortunately) the issue still persists now even when using my old un-tampered library.
Anybody have advice on how to fix the permissions of my library folder, or other insights into the source of the issue?
-
this is what i get from ls -ld
drwxr-xr-x 147 ubuntu ubuntu 4096 Jan 14 19:16 library/
-
I suspect the issue here is somehow related to the filename . The filemanager internally runs with root so it can avoid permissions issues. Maybe those brackets and spaces is confusing the filemanager. Just testing this.edit: removed wrong comment
-
@ethanxrosen said in Renaming book throws permission error after using cloudron file manager:
this is what i get from ls -ld
Did you run this on the Web Terminal ? The permissions look wrong if that is the case. it should be
cloudron
user and notubuntu
user. -
Hey All, circling back on this after a while, I don't think it was a permissions issue after all.
I suspect the way calibre desktop and calibre-web handle capitalization is slightly different and changes stored in metadata.db are case sensitive, so when I uploaded my library folder there were for whatever reason changes to the capitalization of author names that caused the issue.
Solved this by renaming folders and files in file manager to match what the error message was expecting, for example if the "Betty Smith" folder wasn't found, I renamed lowercase "betty smith" to "Betty Smith", after which I was able to normally use calibre-web. Had to do this for ~5-10% of books which is a pain but glad to have it working again. If anyone has found a better solution eager to hear it, scanning through the library for books with missing covers was a good indicator of where the broken links were.