I think I'm still struggling with permissions.
I got the server up and running, but can't seem to add books from a monitored folder.
I created a crontab entry, but it doesn't seem to be doing anything.
>*/10 * * * * xvfb-run calibredb add /home/calibre/CalibreAdd/ -r --with-library /home/calibre/Calibre-Library && rm /home/calibre/CalibreAdd/*
When I run it outside of cron, I get "ReadOnlyError:attempt to write a readonly database"
I also created a script, but that is giving me errors as well.
>if [ "$(ls -A /[autoaddfolder])" ]; then
> calibredb add -r "/[autoaddfolder]" --library-path="/[calibrelibraryfolder]"
> rm /[autoaddfolder]/*
>fi
Traceback (most recent call last):
File "site.py", line 77, in main
File "site-packages/calibre/db/cli/main.py", line 253, in main
File "site-packages/calibre/db/cli/main.py", line 55, in run_cmd
File "site-packages/calibre/db/cli/cmd_add.py", line 374, in main
File "site-packages/calibre/db/cli/cmd_add.py", line 169, in do_add
File "site-packages/calibre/db/adding.py", line 190, in recursive_import
File "site-packages/calibre/db/adding.py", line 149, in import_book_directory_ multiple
File "site-packages/calibre/db/cli/cmd_add.py", line 79, in add_books
File "site-packages/calibre/db/cli/main.py", line 190, in run
File "site-packages/calibre/db/cli/main.py", line 177, in db
File "site-packages/calibre/db/legacy.py", line 81, in __init__
File "site-packages/calibre/db/legacy.py", line 48, in create_backend
File "site-packages/calibre/db/backend.py", line 384, in __init__
File "site-packages/calibre/db/schema_upgrades.py", line 19, in __init__
File "site-packages/calibre/db/backend.py", line 844, in execute
File "src/cursor.c", line 236, in resetcursor
ReadOnlyError: ReadOnlyError: attempt to write a readonly database
So both ways are giving me the same errors.
Changing the /home/calibre/ directory to chmod -R 755 generated a different error. "Permission denied: /home/calibre/Calibre-Library/calibre_test_casesensitivity.txt"
When I chmod to 777, it runs, shows the same errors, but then tries to add the books. It tells me which books are already in the library (although I can't see them on localsite:8080).
It also says that it added book IDs and then lists about a dozen (8096-8113), but I don't see them in the localsite:8080 either.
Last edited by ckronengold; 01-25-2018 at 01:16 AM.
Reason: added
|