Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persist books with user (not root) permissions #92

Open
vik-s opened this issue Aug 8, 2022 · 6 comments
Open

Persist books with user (not root) permissions #92

vik-s opened this issue Aug 8, 2022 · 6 comments

Comments

@vik-s
Copy link

vik-s commented Aug 8, 2022

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!

@sbelongie
Copy link

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

@robflate
Copy link

robflate commented Feb 4, 2023

anyone found a solution to this?

@CyBuzz
Copy link

CyBuzz commented Feb 5, 2023

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.

@knipster
Copy link

Also having this issue....

@4very
Copy link

4very commented Jul 23, 2023

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"

@mikaeltarquin
Copy link

mikaeltarquin commented Dec 16, 2023

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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants