![]() |
#1 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Jul 2017
Device: Sony PRS-350
|
calibredb cli needs admin rights (sudo)
Hi,
I have problems using calibredb. When I run it without sudo it fails silently (not returning any results), only when I use sudo it succeeds: Code:
sudo calibredb list --fields="title,author_sort,tags,cover" --for-machine Any idea how to fix this? I’m on macOS 10.12 Sierra. Last edited by tesep; 07-22-2017 at 02:22 PM. |
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,057
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
sudo need implies there are current user 'rights' issues somewhere in the chain.
The Library (RW) the Executables (need x permission) the (CSV) output destination folder (RW) |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,353
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Pass the correct --with-library argument to it.
|
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Jul 2017
Device: Sony PRS-350
|
Thanks for your answers!
After running the following command it works great! Code:
chmod u+x calibredb ![]() |
![]() |
![]() |
![]() |
#5 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Jul 2017
Device: Sony PRS-350
|
I just noticed that "calibredb" (without sudo) always fails silently when calibre GUI is open. When the GUI is closed sudo is not needed.
Any idea why this happens? Would be good at least to have a error message if the db is blocked! |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,057
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Since 3.x, you can not run the CLI and the GUI at the same time. It is in the release notes and has been mentioned here at MR dozens of times.
![]() |
![]() |
![]() |
![]() |
#7 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Jul 2017
Device: Sony PRS-350
|
Sorry if this has been answered before, I searched in the forum but didn’t find any results to my question.
Hard to tell for me why there is no output. |
![]() |
![]() |
![]() |
#8 | |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Because there was a bug: https://github.com/kovidgoyal/build-...bb3229e0fff372
In the next calibre release, this will show the error message you expected to see. Quote:
|
|
![]() |
![]() |
![]() |
#9 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,515
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
Is it also a bug that running calibredb via sudo works?
Sent from my Nexus 7 using Tapatalk |
![]() |
![]() |
![]() |
#10 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,353
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
![]() |
![]() |
![]() |
#11 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Jul 2017
Device: Sony PRS-350
|
Do the devs:
Can’t you let calls to "calibredb list" through? As they are not writing anything they can do no harm. I am writing a desktop ebook-browser right now which uses the calibre-cli and closing calibre all the time really impairs the usability. |
![]() |
![]() |
![]() |
#12 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,353
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
list is not readonly, any database access is not readonly, since database schemas are upgraded on any connection. You dont need to shutdown calibre, simply run the calibre content server and have calibredb connect to it.
|
![]() |
![]() |
![]() |
#13 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Jul 2017
Device: Sony PRS-350
|
I still don’t really see the purpose in this – worst case you get wrong data back. But I guess 99% most users will call calibredb or use calibre to edit the db, once at a time.
I want to make a minimalist ebook browser which uses the calibre db. Having to close down calibre all the time when you want to add a book makes it hardly usable. Also then making it necessary to run a content server, which is overkill if you just want to browse your own ebooks. So my alternative now is probably getting the data directly from the SQLite db… |
![]() |
![]() |
![]() |
Tags |
calibre, cli, terminal |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to add multiple multiple formats via the calibredb cli | cadaeibfed | Library Management | 2 | 07-06-2017 06:41 AM |
cannot add book to calibredb using CLI | bump | Calibre | 2 | 04-04-2014 01:33 AM |
CLI: calibredb add_custom_column | ilovejedd | Library Management | 8 | 10-19-2012 02:35 AM |
calibredb catalog CLI error | ilovejedd | Library Management | 4 | 02-06-2012 10:26 AM |