Mobileread
Server Upload error (404) w/ enable-local-write
#1  ejwright 11-13-2019, 09:31 PM
Hi, I am getting an error trying to upload a book to the calibre-server running on linux

I am running the following command line:

Code
/usr/bin/calibre-server --port=8888 --enable-local-write /mnt/drive/Books/
and get this error
Quote
----
Failed to communicate with "/cdb/add-book/2/n/test1.azw3/Books", with status: [403 (error)] Forbidden

Anonymous users are not allowed to make changes
------
I have serached the forums, but am at a bit of a loss as to what the issue may be.. the log files doesn't show anything
Reply 

#2  kovidgoyal 11-14-2019, 12:00 AM
you'll need --enable-auth as well IIRC.
Reply 

#3  ejwright 11-20-2019, 09:06 PM
Quote kovidgoyal
you'll need --enable-auth as well IIRC.
Thank-you-- I tried that, but it just turns on authentication.

I was looking to use the "--enable-local-write" which, according to the documentation is supposed to "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."

That is what I was hoping to enable
Reply 

#4  kovidgoyal 11-20-2019, 10:16 PM
Works for me with:

Code
calibre-server --enable-local-write
calibre server listening on 0.0.0.0:8080
OPDS feeds advertised via BonJour at: 192.168.1.5 port: 8080
and

Code
calibredb --with-library=http://localhost:8080 add /t/demo.epub
Reply 

#5  ejwright 11-23-2019, 07:43 AM
Ahh.. thanks for your help getting this sorted...

Mine does work using the local IP

Code
calibredb --with-library=http://localhost:8080 add /t/demo.epub

but doesn't work with external IP (or via the website)

Code
calibredb --with-library=http://192.168.1.100:8080 add /t/demo.epub
Is there anything else that could be causing it?
Reply 

#6  kovidgoyal 11-23-2019, 08:39 AM
local write means write by connections form the local ip address.
Reply 

#7  ejwright 11-23-2019, 10:15 AM
Quote kovidgoyal
local write means write by connections form the local ip address.
Duh! -- I took that to mean enable the process to conduct local writes, thanks for clarifying! (Also, thanks for Calibre - its awesome!)
Reply 

Today's Posts | Search this Thread | Login | Register