Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 12-14-2012, 06:12 PM   #1
Struikrover
Junior Member
Struikrover began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2012
Device: Nexus 7
Server and Account Permission Issues

Hi Guys,

I'm new here and been using calibre to serve my library to my device. Awesome piece of software I have to say =) but alas I have run into some 'technical' difficulties. Spent the last few days trolling all the forum for related post that may give me a hint but luck so far, so I figured I'll have to ask one of you calibre wizards with more expertise cause I'm fresh out of ideas...

What I would like to do
Serving my book library via the content server on a HTPC which is on 24/7, and I would like to use calibre companion to browse my HTPC library via Wifi on my Nexus 7. Sounds easy?

How far I got so far
I have a functioning (W7 Ultimate, 64Bit) HTPC which runs XBMC 24/7, with 2 accounts (one administrator & one Standard User Account). Basically when I press the power button it automatically logs into the standard user account and starts XBMC which feeds my TV (and can control with my tablet). Reason I have it in Standard User account is so programs don't inadvertently tamper with my media. That's what my admin account is for.

So I installed Calibre 64bit on this server and have it load my library on start-up. No problems so far. I created a scheduled task event (in admin mode) which starts the stand-alone calibre server on start-up (in standard user account). I checked that this task starts up under Standard User Account (with Scheduled Task library) and it indeed does so (task running). And my Nexus 7 appears to connect to this server but I don't see my book library (only the one calibre quick-start guide book)?

There do not appear to be any options I can play with on the server side and don't know how to run command-line instructions on the stand-alone server (can't find any manual instructions on it either, only the content server that is started within calibre is mentioned). I know the stand-alone server runs because when I start the content server within calibre it crashes (because it is doubling up, so the log says port 8080 is not available).

I have tried it the other alternative way around as well. Having Calibre start upon booting and starting the content server upon start-up. I can connect with my nexus to this server (automatic settings) without problems and the books show in CC. I can also connect to it as a device and send books to the Nexus. The problem with this method is that I always get prompted to provide admin password upon start-up, and I have literally tried every option, in vain, to make this prompt go away (assigning highest privileges in task scheduler, giving the Calibre icon to start in admin mode and putting that in the start-up folder. Nothing seems to make the prompt go away (it does its job in that regard very well =). I deduct this problem doesn't exist with the standalone server because it is read-only?

So I desperately need help from brighter minds here =). 1) Would it be possible to run the stand-alone server and fix this books-not-serving problem? Are there any prefs or command line instructions I can give it somehow? Alternatively if this route doesn't pan out, is there a way to run calibre upon start-up in Standard User Account without prompting? The one thing I would really rather steer clear off is disabling UAC, or giving this Account admin rights (by permanently changing its privileges).....=) Congrats if you made it this far...!

Cheers,
Struikrover is offline   Reply With Quote
Old 12-15-2012, 02:37 AM   #2
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,734
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Can't help with the permission problems, although I would guess that it is forcing the login because calibre is asking to talk to the screen while calibre-server does not.

As regards running the server standalone, the documentation you are looking for is here. The "missing books" probably happen because the instance of calibre-server is looking at the default (empty) library instead of the "real" one you have put somewhere else. You have two choices:

1) use the --with-library option to calibre-server
2) use the CALIBRE_CONFIG_DIRECTORY environment variable to tell the content server to use the same config that GUI calibre uses.

The first is almost certainly easier.
chaley is offline   Reply With Quote
Old 12-15-2012, 10:04 PM   #3
SneeziePacker
Junior Member
SneeziePacker began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Dec 2012
Device: Android tablet
In installed the 64 bit version today and then uninstalled the 32 bit version.

I'd been running the 32 bit version previously, with system tasks to start the content server two times. Once on port 8080 for myself and once on port 8081 for another family member, using a saved searches to narrow down the content differently for each instance.

With the 64 bit software, I can no longer connect to the content server that is started as a stand-alone. I can stop that task, run it within calibre 64-bit, and that does work. I did update the path for the new location of the software in my tasks.

Could there be a problem with the content server in the 64 bit version? I too see the task running like the original poster.

Kathy
SneeziePacker is offline   Reply With Quote
Old 12-15-2012, 10:24 PM   #4
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,843
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You need to allow it through your firewall. 64bit server is a different program to 32-bit server as far as windows is concerned.
kovidgoyal is offline   Reply With Quote
Old 12-15-2012, 10:43 PM   #5
SneeziePacker
Junior Member
SneeziePacker began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Dec 2012
Device: Android tablet
THAT is the step I missed! I switched my firewall settings to allow the content-server.exe in the new location through, and I am back in business. Struikrover, I hope that is your issue as well.

Thank you so very much for the quick response, Kovid.

Kathy
SneeziePacker is offline   Reply With Quote
Old 12-17-2012, 04:00 PM   #6
Struikrover
Junior Member
Struikrover began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2012
Device: Nexus 7
Question

Quote:
Originally Posted by chaley View Post
Can't help with the permission problems, although I would guess that it is forcing the login because calibre is asking to talk to the screen while calibre-server does not.

As regards running the server standalone, the documentation you are looking for is here. The "missing books" probably happen because the instance of calibre-server is looking at the default (empty) library instead of the "real" one you have put somewhere else. You have two choices:

1) use the --with-library option to calibre-server
2) use the CALIBRE_CONFIG_DIRECTORY environment variable to tell the content server to use the same config that GUI calibre uses.

The first is almost certainly easier.

Hi guys,

Many thanks for the feedback. I had some more time with my setup and the calibre stand-alone content server. I checked the firewalls of both the Admin & Standard User accounts and both calibre64bit and calibre server are allowed through, so that shouldn't be the culprit. Chaley, I also tried your excellent first suggestion by adding an argument to the server instance, trying to point it to my library, which is indeed located somewhere else (on an external drive).

I wasn't entirely sure where to add the --with-library argument, so I added it under the scheduled task, first behind the actual program executable (like in the old DOS days), and secondly in the additional argument box. Unfortunately, neither will work and with the argument the task simply won't start complaining along the lines of syntax error. I tried the arguments both with "" and without, but not luck. I might not be adding it correctly?

Now get this, in the administrator account I can start the scheduled task (minus the above argument) for both the Admin and Standar User Account. However, connecting with CC to the running remote server under Admin account my library shows up as it should. If I run the exact same task but for my Standard User Account (followed by logging into that account) I can connect to the server but once again only the quickstart book shows up. That's so strange

So I suppose my next question is = what is the correct way of adding the library argument to my task? Even if it doesn't work, surely it shouldn't throw me a syntax error.....Would the problem be that my library is located on an external drive? I should add that the Standard User Account has read access only to my external drives...I configured it that way under account privileges. So I will try moving my library to the standard location. Does the stand-alone server keep a log I can have a look at, and where may I find it?

If all this fails I'll look into option 2, but I am open to anyone's suggestions

Many thanks for your time so far, =)
Struikrover is offline   Reply With Quote
Old 12-18-2012, 03:25 AM   #7
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,734
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
@Struikrover: I don't know how one enters parameters when starting tasks, so can't help there.

I think that the content server opens the db read-only, but I wouldn't guarantee that.

The reason that the admin account sees your library and the other account doesn't is probably differences in the calibre configuration between the two users. In addition to a lot of other things such as plugins and options, calibre keeps the path to the last library opened. You should have the "standard user" reference the same config folder as the "admin user", either directly or by copying the config. To find the config, start the calibre gui as admin, go to preferences -> misc and select "Open the calibre configuration directory".

My guess is that copying the config is the best option, as it will avoid all the cross-user permission problems.

One way you can get this set up is to login as the standard user, start the calibre gui, then navigate to the library folder (Switch Library). This process should record that library in the user's config. While you are there you might want to set the other content server options so you can avoid the apparently difficult setting of command-line options.
chaley is offline   Reply With Quote
Old 12-19-2012, 03:45 PM   #8
Struikrover
Junior Member
Struikrover began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2012
Device: Nexus 7
Quote:
Originally Posted by chaley View Post
@Struikrover: I don't know how one enters parameters when starting tasks, so can't help there.

I think that the content server opens the db read-only, but I wouldn't guarantee that.

The reason that the admin account sees your library and the other account doesn't is probably differences in the calibre configuration between the two users. In addition to a lot of other things such as plugins and options, calibre keeps the path to the last library opened. You should have the "standard user" reference the same config folder as the "admin user", either directly or by copying the config. To find the config, start the calibre gui as admin, go to preferences -> misc and select "Open the calibre configuration directory".

My guess is that copying the config is the best option, as it will avoid all the cross-user permission problems.

One way you can get this set up is to login as the standard user, start the calibre gui, then navigate to the library folder (Switch Library). This process should record that library in the user's config. While you are there you might want to set the other content server options so you can avoid the apparently difficult setting of command-line options.
Cheers Chaley...Both Calibre instances are vanilla so to say. Started up once and directed to my library (which is what it opens at default now on start-up), so it should be set in the config properly. I redid it just to be sure but no luck. I then did a rough copy entire config folder from the admin account to my User account - Which made the whole server not run at all any more

Then I tried assigning write privileges to the standard user for the OS drive. It didn't like that at all =) But its not all bad. I solved the problem in the end by changing the account type of the Standard User to Administrator, but restricting the privileges of this User to read-only on all external drives. I can't imagine it'll hurt as it is a bare-program-bones machine, behind a hard- and soft firewall, and my external drives remain protected under this account.

Once changed the "Standard User who is Now Administrator" library showed up immediately, as like like magic. Not really what I desired but it'll do...Its worthwhile adding here that even that way but while having my library on an external drive (with restricted read-only privs) it throws a major fit (long-winded error message telling me calibre can only open the db as read-only). So I had to move the library to my C drive (which with admin now has write access) to make it function properly. So in a nutshell, I suspect that even with the stand-alone server serving a backup copy of my library (one that will not undergo any editing by me) it still requires write access to the drive regardless, and without write-access it automatically defaults to its empty library. Must be by design, perhaps the authors can confirm this?

Either way, an interesting session of problem solving , and many thanks for your help trying to trace the problem. I probably over described the problem-solving but hopefully it'll be of use to the next guy....

Anyhows have a good Holidays,
Many Cheers,
Struikrover is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Standalone content-server and Calibre Companion issues duckpuppy Devices 2 11-08-2012 07:54 AM
'You do not have permission..' akin Kobo Tablets 2 06-10-2012 07:56 PM
K3 permission problem BusterBrown Kindle Developer's Corner 15 06-07-2012 07:39 PM
Write Permission wtw1936 Library Management 2 09-21-2011 12:40 AM
Permission denied? desertgrandma Kindle Formats 16 01-26-2009 06:06 AM


All times are GMT -4. The time now is 05:59 PM.


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