openbooks icon indicating copy to clipboard operation
openbooks copied to clipboard

Persist books with user (not root) permissions

Open vik-s opened this issue 2 years ago • 6 comments

Hey, I'm running the latest docker install of Openbooks. I absolutely love it, thanks for your work. One issue I run into is, when I download books, they are stored in the persist directory with root permissions. This stops Calibre from running Auto-import till I change the permission of the downloaded books, into my user permissions. I do not run the docker container as root, but instead as my specified docker user.

Is there any way I can define the owner / permissions of the books being persisted?

Thanks!

vik-s avatar Aug 08 '22 04:08 vik-s

would like to know a way to fix this issue as well.

sbelongie avatar Oct 03 '22 19:10 sbelongie

anyone found a solution to this?

robflate avatar Feb 04 '23 18:02 robflate

I just wrote a cron job to change the permissions of files in the download folder and it runs every 5 minutes. The books get picked up by Calibre once the permissions change.

CyBuzz avatar Feb 05 '23 17:02 CyBuzz

Also having this issue....

knipster avatar Jun 14 '23 22:06 knipster

You can specify the UID and GID of a container via compose. Cheers!

  openbooks:
    restart: unless-stopped
    container_name: openbooks
    command: --name my_irc_name --persist --port 80 --no-browser-downloads -d /books
    image: evanbuss/openbooks:latest
    user: "1002:1002"

4very avatar Jul 23 '23 23:07 4very

You can specify the UID and GID of a container via compose. Cheers!

  openbooks:
    restart: unless-stopped
    container_name: openbooks
    command: --name my_irc_name --persist --port 80 --no-browser-downloads -d /books
    image: evanbuss/openbooks:latest
    user: "1002:1002"

I found this post while trying to figure out this exact issue (openbooks to calibre auto-add from folder). I added the user line exactly, but files are still coming in with read only permissions for "group" and "other" (-rw-r--r--), as far as my unraid server can tell. Here is my full docker compose file, not sure what the issue is:

version: '3.3'
services:
    openbooks:
        container_name: OpenBooks
        image: evanbuss/openbooks:latest
        ports:
            - "8585:80"
        volumes:
            - '/mnt/user/data/media/eBooks/to_import:/books'
        command: --name my_irc_name --persist --no-browser-downloads
        restart: unless-stopped
        environment:
          - BASE_PATH=/openbooks/
        user: "1002:1002"
volumes:
    booksVolume:

Edit: Never mind! Was able to fix it by changing the user line to "99:100":

version: '3.3'
services:
    openbooks:
        container_name: OpenBooks
        image: evanbuss/openbooks:latest
        ports:
            - "8585:80"
        volumes:
            - '/mnt/user/data/media/eBooks/to_import:/books'
        command: --name my_irc_name --persist --no-browser-downloads
        restart: unless-stopped
        environment:
          - BASE_PATH=/openbooks/
        user: "99:100"
volumes:
    booksVolume:

mikaeltarquin avatar Dec 16 '23 10:12 mikaeltarquin