Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 11-24-2020, 03:29 PM   #1
rodvp
Junior Member
rodvp began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Aug 2013
Device: nexus 4
Login failure with userdb with content server

I'm using a headless content server on a Raspberry Pi, and want to segregate two virtual libraries (basically so my kid can see just his books). In the past, with calibre version 2, I had 2 content servers operating on different ports, each attached to a different virtual library. But as of version 3 of calibre, this is no longer possible.

So now I've created 2 users, set their passwords, and associated them with a library via the --manage-users option. One of the users has username/password "me/me". Then started the content server with:

Code:
/usr/bin/calibre-server --port=58083 --pidfile=/data/calibre/calibrePID_x --userdb=/data/calibre/users.sqlite --access-log=/data/calibre/log --enable-auth --auth-mode=basic /data/ebook
When I try to connect, either via browser or calibre-companion, it asks for a username/password, but when I supply "me/me", I get the error message:

Code:
Failed to communicate with "/interface-data/init?1606249107278", with status: [403] Forbidden

The user me is not allowed to access any libraries on this server
I see the same message in the access log

Running calibre-server --manage-users shows:

Code:
What do you want to do? [1-4]: 2
Existing user names:
him, me
Enter the username: me

me has read-write access
1) Show password for me
2) Change password for me
3) Change read/write permission for me
4) Change the libraries me is allowed to access
5) Cancel

What do you want to do? [1-5]: 1

Current password for me is: me

me has read-write access
I am using calibre version 3.39.1, as this is all that's available for raspbian buster.

Any assistance is appreciated.
rodvp is offline   Reply With Quote
Old 11-24-2020, 11:04 PM   #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: 43,839
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I'm afraid that version of calibre is waaaaay too old. No one will remember details for it. Firs tinstall up to date calibre on your computer and see if the problem can be replicated there. If not, then switch to something like archlinuxarm on your Pi for updated calibre builds.
kovidgoyal is offline   Reply With Quote
Advert
Old 11-25-2020, 01:26 PM   #3
rodvp
Junior Member
rodvp began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Aug 2013
Device: nexus 4
Thanks. I figured that might be an issues. I tried building from source (both the last minor version in the 3.X line, and the most recent one) for the pi under raspbian buster, but there were a lot of issues.
rodvp is offline   Reply With Quote
Old 11-25-2020, 04:31 PM   #4
rodvp
Junior Member
rodvp began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Aug 2013
Device: nexus 4
I'm seeing exactly the same issue with v5.5 on an ubuntu host. After creating and setting up a user db, then starting the calibre-server with authentication enabled, I'm getting the same error:

Code:
> calibre-server --userdb /tmp/users.sqlite --enable-auth --port=58083 /data/ebook

Failed to communicate with "/interface-data/init?1606339410018", with status: [403 (error)] Forbidden

The user me is not allowed to access any libraries on this server
rodvp is offline   Reply With Quote
Old 11-25-2020, 08:43 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: 43,839
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
With what browser? And try using basic instead of digest auth. --auth-mode basic
kovidgoyal is offline   Reply With Quote
Advert
Old 11-26-2020, 12:05 PM   #6
rodvp
Junior Member
rodvp began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Aug 2013
Device: nexus 4
I've been using chrome and firefox (recent versions on ubuntu host).

I think the issue is with specifying the virtual library name in the db. I don't think I understand the syntax.

I can access the library if I allow the user "me" to access all libraries. When I access via a browser, it prompts which library I want to access, with only one shown being "ebook". Which happens to be the same name as the directory the library is sitting in - is this set somewhere explicitly?

If I give access to only library "ebook" to user "me", it also works fine. I thought the library name it was prompting for was the virtual library name, but this is evidently not the case. So the question is how to I specify the name of a virtual library in the access control list of the userdb?
rodvp is offline   Reply With Quote
Old 11-26-2020, 09:42 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: 43,839
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use 4) per library restrictions and enter a search expression to restrict to. Virtual libraries are just search expressions.
kovidgoyal is offline   Reply With Quote
Old 11-27-2020, 12:48 AM   #8
rodvp
Junior Member
rodvp began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Aug 2013
Device: nexus 4
Thank you!

That did the trick.
rodvp is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Content Server Login method SASSBS Server 1 07-23-2018 02:55 AM
calibre-server 3.1 linux upgrade with userdb Pascougnou Calibre 4 06-23-2017 09:31 AM
V3.0 commandlline calibre-server userdb mcaron1234 Calibre 6 06-18-2017 01:08 PM
since 1.35 content server fails to start - bonjour failure, wrong IP Clark G. Flipper Calibre 6 05-12-2014 07:21 AM
Calibre Content Server - login The QCC Calibre 2 03-14-2011 10:13 PM


All times are GMT -4. The time now is 01:53 PM.


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