Mobileread
Set user limitations for Calibre Server
#1  TestCase 07-14-2019, 03:01 PM
Hi,

I'm trying to disable write/delete access for a user but I am failing. The following sequence is partly in Dutch but I assume that's no obstacle. 'BoekServer' is the username.

BoekServer has read-write access
1) Show password for BoekServer
2) Wijzig paswoord voor: BoekServer
3) Change read/write permission for BoekServer
4) Change the libraries BoekServer is allowed to access
5) Annuleren

Wat wil je doen? [1-5]: 3

Prevent BoekServer from making changes (i.e. remove write access)? [y/n]: y

BoekServer has read-write access
1) Show password for BoekServer
2) Wijzig paswoord voor: BoekServer
3) Change read/write permission for BoekServer
4) Change the libraries BoekServer is allowed to access
5) Annuleren

As can be seen the user still has read-write access.

Thanks & regards,
Kees.
Reply 

#2  kovidgoyal 07-15-2019, 01:23 AM
strange, what version of calibre/operating system is this?
Reply 

#3  TestCase 07-15-2019, 04:50 AM
It's 3.44 (x64) on Windows Server 2008.

Thanks.
Reply 

#4  TestCase 07-15-2019, 05:18 AM
Just tried 3.45.2 but same issue.
Reply 

#5  kovidgoyal 07-15-2019, 05:21 AM
Can you run the calibre GUI, you can do it from there and just copy over the users.db file to the actual server.
Reply 

#6  TestCase 07-15-2019, 05:32 PM
Created a userdb.sqlite using the GUI (3.45.2) with the correct user. Cleared the write flag!
Copied it to C:\srv\Calibre and renamed to users.sqlite as it seems to have a different name in there?
Checked it using the CLI but it showed incorrect. (Didn't modify anything)
Started Calibe Server and checked the user which still has write access.

Alas
Reply 

#7  kovidgoyal 07-15-2019, 10:59 PM
Are you sure you are using the right db from the command line? Use the --userdb command line argument to tell the server which db to use.
Reply 

#8  TestCase 07-16-2019, 05:59 PM
Indeed, it seemed I was using the wrong database in the last step. I copied the userdb (userdb.sqlite) from the Program Files\Calibre2 directory which seems to be an old database which is not modified by the current GUI?

When using the GUI everything is ok now for the time being.
The remaining issue now is I cannot use the CLI to start Calibre Server as I cannot locate the correct userdb which is being updated/used by the GUI. Where do you 'hide' this userdb?

(This is beside the fact that the CLI is still failing when modifyjng the userdb)
Reply 

#9  kovidgoyal 07-16-2019, 10:01 PM
The file in the program directory is never modified. Programs should never modify their own files. Customized versions are stored int he calibre config directory, which you can find vi Preferences->Miscellaneous I dont recally if it i in a sub-directory, do asearch to find it.
Reply 

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