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

[Bug]: AUDIOBOOKSHELF_UID & AUDIOBOOKSHELF_GID values not being honored #584

Closed
wshyang opened this issue May 11, 2022 · 5 comments
Closed
Labels
bug Something isn't working

Comments

@wshyang
Copy link

wshyang commented May 11, 2022

Describe the issue

I started a container following the sample docker command provided on the main page

docker run -d \ -e AUDIOBOOKSHELF_UID=65500 \ -e AUDIOBOOKSHELF_GID=65500 \ -p 13378:80 \ -v $PWD/audiobooks:/audiobooks \ -v $PWD/config:/config \ -v $PWD/metadata:/metadata \ --name audiobookshelf \ --rm ghcr.io/advplyr/audiobookshelf

However subsequently when checking the contents of the files created in the volumes, I found that they are all created under root:root. It appears that within the container itself, the process is running as root too.

Steps to reproduce the issue

  1. docker run -d \ -e AUDIOBOOKSHELF_UID=65500 \ -e AUDIOBOOKSHELF_GID=65500 \ -p 13378:80 \ -v $PWD/audiobooks:/audiobooks \ -v $PWD/config:/config \ -v $PWD/metadata:/metadata \ --name audiobookshelf \ --rm ghcr.io/advplyr/audiobookshelf
  2. Check permissions of created files

Audiobookshelf version

2.0.12

How are you running audiobookshelf?

Docker

@wshyang wshyang added the bug Something isn't working label May 11, 2022
@TheOneValen
Copy link

I can confirm this bug exists in 2.0.15

@advplyr
Copy link
Owner

advplyr commented Jun 18, 2022

A lot of updates were made to setting ownership of files/folders created by abs. If this is still an issue we can re-open this but please provide specific folders/files that are not set correctly.

@advplyr advplyr closed this as completed Jun 18, 2022
@raviolispy
Copy link

@advplyr I'm still having this issue - two example files are /config/playlists/njodb.properties and the logs in /metadata/logs/daily. Both are created with root UID/GID. This cropped up for me when I tried to use an sshfs volume.

xxx@xxx /tmp
base ❯ docker run -d -e AUDIOBOOKSHELF_UID=1002 -e AUDIOBOOKSHELF_GID=1003 -v $PWD/metadata:/metadata -v $PWD/config:/config --rm ghcr.io/advplyr/audiobookshelf
25248d96d01fdce921e7fbf2377a79a7f31d9bd36249f957c6970fab1e1cacee

xxx@xxx /tmp
base ❯ ls -al config/playlists
total 20
drwxr-xr-x  4 root root 4096 Dec  5 01:14 .
drwxr-xr-x 12 root root 4096 Dec  5 01:14 ..
drwxr-xr-x  2 root root 4096 Dec  5 01:14 data
-rw-r--r--  1 root root  351 Dec  5 01:14 njodb.properties
drwxr-xr-x  2 root root 4096 Dec  5 01:14 tmp

xxx@xxx /tmp
base ❯ ls -al metadata/logs/daily
total 12
drwxr-xr-x 2 root root 4096 Dec  5 01:14 .
drwxr-xr-x 3 root root 4096 Dec  5 01:14 ..
-rw-r--r-- 1 root root 1377 Dec  5 01:14 2022-12-05.txt

@advplyr advplyr reopened this Dec 5, 2022
@advplyr
Copy link
Owner

advplyr commented Dec 5, 2022

@raviolispy Thanks. I can confirm the database files being created in /config and the logs in /metadata/logs are not getting the ownership set correctly.

@advplyr advplyr pinned this issue Dec 5, 2022
@advplyr advplyr added the awaiting release Issue is resolved and will be in the next release label Dec 15, 2022
@advplyr advplyr unpinned this issue Dec 16, 2022
@advplyr
Copy link
Owner

advplyr commented Dec 18, 2022

Fixed in v2.2.9

@advplyr advplyr closed this as completed Dec 18, 2022
@advplyr advplyr removed the awaiting release Issue is resolved and will be in the next release label Dec 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants