![]() |
#1 |
Junior Member
![]() 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 |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Junior Member
![]() 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:
Is there an error or debug log I could set up or look through to help with the investigation? |
|
![]() |
![]() |
![]() |
#4 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#5 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Apr 2020
Device: none
|
Set up the log and getting no new info:
Quote:
|
|
![]() |
![]() |
![]() |
#7 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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
|
![]() |
![]() |
![]() |
#8 |
Junior Member
![]() 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. |
![]() |
![]() |
![]() |
#9 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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
|
![]() |
![]() |
![]() |
#10 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
And here you go: https://github.com/kovidgoyal/calibr...32b69aa8dd2def
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |