Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Server

Notices

Reply
 
Thread Tools Search this Thread
Old 04-08-2020, 09:38 AM   #1
Smith_oo4
Junior Member
Smith_oo4 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Apr 2020
Device: none
How to have an un-authenticated add a e-book

Is there a way to run calibre-server on a modern linux system such that an un-authenticated uses (i.e. no login is required) can add, delete, edit metadata, etc.?

I have tried adding the “--enable-local-write” option to my systemd unit (see below) but I still get the “Anonymous users are not allowed to make changes” error when I try to add a book. I am on calibre-server (calibre 4.13) version.

Code:
[Unit]
Description=Calibre Content Server
Documentation=https://manual.calibre-ebook.com/server.html
After=network.target

[Service]
Type=simple
User=calibre
Group=calibre
ExecStart=/usr/bin/calibre-server --url-prefix /calibre --port 8080 --enable-local-write /mnt/media/ebook

[Install]
WantedBy=default.target
Smith_oo4 is offline   Reply With Quote
Old 04-08-2020, 10:19 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Works fine for me. Did you remember to reload the systemd unit. Run the server from the command line first to make sure it works.
kovidgoyal is offline   Reply With Quote
Advert
Old 04-08-2020, 12:44 PM   #3
Smith_oo4
Junior Member
Smith_oo4 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Apr 2020
Device: none
I have reloaded the systemd unit, also I do know that a few times in testing this I have also rebooted.

I have run the server from the command line two and get the same issue. Below is the full error I get when I try to add a book.


Quote:
Failed to upload the file: Eat Clean_ Wok Yourself to Health - Ching-He Huang.epub
You must be logged in to make changes to the library

Failed to communicate with "/cdb/add-book/2/n/Eat%20Clean_%20Wok%20Yourself%20to%20Health%20-%20Ching-He%20Huang.epub/ebook", with status: [403 (error)] Forbidden

Anonymous users are not allowed to make changes
When I set up user authenticated I do not get this error on the server I don't get this error.

Is there an error or debug log I could set up or look through to help with the investigation?
Smith_oo4 is offline   Reply With Quote
Old 04-08-2020, 12:53 PM   #4
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,181
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
I seem to remember that --enable-local-write only works for local connections to the server. Remote connections will need to authenticate.

From the calibre documentation (bolding mine):


--enable-local-write, --disable-local-write

Allow un-authenticated local connections to make changes. Normally, if you do not turn on authentication, the server operates in read-only mode, so as to not allow anonymous users to make changes to your calibre libraries. This option allows anybody connecting from the same computer as the server is running on to make changes. This is useful if you want to run the server without authentication but still use calibredb to make changes to your calibre libraries. Note that turning on this option means any program running on the computer can make changes to your calibre libraries. By default, this option is disabled.
DNSB is offline   Reply With Quote
Old 04-08-2020, 01:31 PM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The servers logging diretives are configured via its command line options, see --help
kovidgoyal is offline   Reply With Quote
Advert
Old 04-08-2020, 01:49 PM   #6
Smith_oo4
Junior Member
Smith_oo4 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Apr 2020
Device: none
Set up the log and getting no new info:

Quote:
192.168.0.20 port-43568 - 08/Apr/2020:11:43:24 -0600 "POST /cdb/add-book/1/n/Eat%20Clean_%20Wok%20Yourself%20to%20Health%20-%20Ching-He%20Huang.epub/ebook HTTP/1.1" HTTPStatus.FORBIDDEN 190
I am accessing this from a remote connection. Does this mean there is no way to run calibre-server on a modern Linux system such that an un-authenticated uses (i.e. no login is required) on a remote connection can add, delete, edit metadata, etc.?
Smith_oo4 is offline   Reply With Quote
Old 04-08-2020, 10:45 PM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
192.168.0.20 is not a local IP address. You need to connect to 127.0.0.1
kovidgoyal is offline   Reply With Quote
Old 04-08-2020, 11:03 PM   #8
Smith_oo4
Junior Member
Smith_oo4 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Apr 2020
Device: none
Will this only work if you are connecting from a local IP address, i.e. 127.0.0.1 or localhost?

This is really not the functionality I am looking for. I would like to be able to add an e-book for another host on my local LAN. I get the security around this, so I understand why this is not an option.
Smith_oo4 is offline   Reply With Quote
Old 04-08-2020, 11:16 PM   #9
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Yes thats why the documentation for the option says "running on the same computer". It will work only if the IP address for the connection is a local one, either IPv4 or IPv6
kovidgoyal is offline   Reply With Quote
Old 04-09-2020, 03:04 AM   #10
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
And here you go: https://github.com/kovidgoyal/calibr...32b69aa8dd2def
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Do I have ADD? Why do I have to put a book down? Derf General Discussions 16 08-27-2018 12:03 AM
Authenticated http proxy Keltia Calibre 5 06-26-2017 05:37 AM
can't add book JJG Library Management 1 04-11-2014 12:25 PM
Add book problem baylorlinz Library Management 1 05-14-2012 09:55 AM
Can't Re-add Book Jafo Library Management 24 10-28-2011 01:16 AM


All times are GMT -4. The time now is 06:11 PM.


MobileRead.com is a privately owned, operated and funded community.