0

Background Info:

I've used Calibre for many, many years. I use the content server to allow access to my libraries over my local network. However, sometime in December the content server stopped working. I first thought that a firewall setting may have been changed. But checking the firewall, routers and routing tables shows the port I run the content server is are open. I didn't really pursue this issue as I found that starting the calibre server as my regular user gave me access. However, I have become frustrated with the lack of access to add or modify my library while sitting at my workstation on which calibre is run. I like the easy access that running calibre desktop gives me. Today I decided to tackle this issue and learned that Calibre works on the network if ran with sudo or as root. However, running it as my standard user (which I have always done) does not work. So I expect this is a permission issue...

System: Ubuntu 22.04 with latest updates (I run apt update and apt upgrade every morning). Calibre: Versions from 6.10 on have had this issue. I am currently on 6.14.

Python: I have ran Calibre with python versions 3.7 - 3.11 using update-alternatives and have the same results.

Query: What do I need to do to be able to run calibre's content server as my regular user account instead of using sudo?

  • Probably the first time you launched Calibre as a root user it changed all the ownership of the ~/.config/calibre directory and its contents to root instead of your user. If that directory and its contents are owned by root you will not be able to launch it correctly. Show the output of ls -al ~/.config/calibre – Terrance Mar 11 '23 at 04:59
  • Sorry, I had a medical procedure and was offline for a few days. Thanks for the reply. I listed the files in the ~/.config/calibre directory and they all show they are owned by my standard user account. So the permission issue is not with the ~/.config/calibre directory. Any other ideas? – user693336 Mar 17 '23 at 22:53
  • Maybe check the permissions of both the calibre and calibre-server apps. ls -al /opt/calibre/calibre-server and ls -al /opt/calibre/calibre – Terrance Mar 18 '23 at 22:47
  • The permissions on both (and everything under /opt) are owner and group is root. permissions are -rwxr-xr-x, I believe that's owner can read, write, and execute, group can read and execute, and others can read and execute. These are the same permissions for other things in /opt like my web browser which I can run as my regular user. For completeness: ls -al /opt/calibre/calibre-server -rwxr-xr-x 1 root root 14472 Mar 9 17:24 /opt/calibre/calibre-server, ls -al /opt/calibre/calibre -rwxr-xr-x 1 root root 14472 Mar 9 17:24 /opt/calibre/calibre – user693336 Mar 19 '23 at 03:03
  • One other question and then I am officially out of ideas here. Both calibre and calibre-server work fine for my user account without any issues. What Kernel version are you running? Ubuntu 22.04.2 LTS defaults to the 5.19 Kernel on a clean install, and unfortunately I bumped into issues with it where drivers would fail in the 5.19, then work if I reinstalled the driver, then fail again. It was very unpredictable. I went back to just the 5.15 Kernel and have not had any issues. Beyond the Kernel, I am out of ideas. Sorry about that! – Terrance Mar 19 '23 at 03:18
  • The kernel version via uname -r is 5.15.0-67-generic. Here I should say that I upgraded to 22.04 from 20.04. I do run apt update and apt upgrade daily. I keep that last three kernel version on the system as I have had issues with some of the software I use almost daily like Quartus II and ModelSim. I will try rolling back to another kernel version and update this post with the results. Thank you so much Terrance for you help! – user693336 Mar 23 '23 at 03:24
  • 1
    Solved - After weeks of messing with this, I solved the issue tonight! In the Advanced Setting for the Content Server, the max size for a single HTTP header was set to 0.0. The however didn't affect the server when run from the terminal. I set this value to 2 Kb first and then played with the value and settled on 10kb. But anything from > 2Kb seemed to work just fine. Still, I increased it to provide some headroom. I should note that I have no idea how this value was changed and why the issue occurred right after an update to a version back around December. – user693336 Apr 04 '23 at 04:29
  • You should write that up as an answer. I'll totally upvote it! Good job!! – Terrance Apr 04 '23 at 04:41

0 Answers0