-
Notifications
You must be signed in to change notification settings - Fork 381
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]: Docker creates cover.jpg as root instead of using AUDIOBOOKSHELF_UID #394
Comments
I can confirm |
When I manually set the user in the docker-compose file, I get an error on startup that the required directories cannot be created, even though I am using volumes.
|
Can you share your full docker compose |
version: '2.4'
services:
audiobookshelf:
image: advplyr/audiobookshelf:1.7.2
container_name: P-audiobookshelf
restart: on-failure:5
ports:
- 192.168.0.220:8187:80
user: 1000:1000
environment:
- AUDIOBOOKSHELF_UID=1000
- AUDIOBOOKSHELF_GID=1000
security_opt:
- apparmor:docker-default
- no-new-privileges
cpu_shares: 100
pids_limit: 100
mem_limit: 200m
read_only: true
volumes:
- audiobooks:/audiobooks
- metadata:/metadata
- config:/config
# Use the same time zone as the host machine.
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
volumes:
audiobooks:
metadata:
config: |
chown on the volumes? |
I have the volumes created automatically or what exactly do you mean? |
Oh, those volumes don't already exist? |
They do not exist because I deleted them before.
Config /config /metadata /audiobooks Error: EACCES: permission denied, mkdir '/config/audiobooks' npm ERR! Failed at the audiobookshelf@1.7.2 start script. |
It's creating that /config dir then, can you check the owner of that dir? |
As far as I can see it is "root" :( |
I have now created my own directory with userid 1000 and used that instead of the volumes. Now it works! |
Oh okay so I guess the server should be setting the owner of those initial directories to the UID/GID passed in env. |
…ing intitial config/metadata directories at startup then set owner of those #394
Initial directories and downloaded/uploaded covers will be getting the proper permissions and owners set now in v2.0.3 |
…ing intitial config/metadata directories at startup then set owner of those advplyr#394
Describe the issue
I found that when using docker-compose with an env of AUDIOBOOKSHELF_UID:AUDIOBOOKSHELF_GID as 1000:1000, although other files are created fine,
cover.jpg
is created owned byroot
.Steps to reproduce the issue
metadata.abs
file is created correctly, butcover.jpg
is owned by root.Audiobookshelf version
v1.7.2
How are you running audiobookshelf?
Docker
The text was updated successfully, but these errors were encountered: