pinchflat
pinchflat copied to clipboard
Downloaded Content is owned by Root instead of specified user:group in docker-compose.yml
Hello,
Really great app. I'm running it in a docker container.
Here is my config: https://github.com/JohnnyBlocks/ghidorah-portainer/blob/main/pinchflat/docker-compose.yml
Everything seems to be working amazingly with one caveat.
The folders it creates are owned by root:root.
I've specified my user ID and user group in the YML file, but content is created as root.
Any suggestions on how to make it run so the content it downloads is owned by my user?
Worst case I can just schedule a job to run and fix permissions, but if it could create folders under my user:group, that would be ideal.
Appreciate all your efforts!
I don't think this image supports PUID/PGID env vars. Use the native Docker's user switching mechanism
@blinky-z I specified a user id in the services of my docker-config.yml and it would not launch. Is that the method you were suggesting?
And you are correct, it does not value PUID/PGID.
Hey there! Thanks for the report (:
Could you try setting the env var to just UMASK instead of UMASK_set?
That was successful. I also realized for my use case I want 000 (to enable samba users to administer files remotely).
My current compose file: https://github.com/JohnnyBlocks/ghidorah-portainer/blob/main/pinchflat/docker-compose.yml
I do note that the 'Delete Source and Files' under Sources is not actually remove the files. I believe it has in the past but I could be mixing it up with the similar feature under Media Profiles.
However, UMASK variable gave me ability to set permissions to make it work for me.
The ideal state would be to specify PUID/PGID env vars and have it create the files/folders under that account, but I recognize that the efforts might not be worth is as the UMASK can be used to facilitate permissions.
Thank you for all of the assistance. It's a very nice app to add to my home server.
I specified a user id in the services of my docker-config.yml and it would not launch.
Did you wipe your config before making this change? If not, you probably have to chown/chmod the volumes (especially the database) to be read/writable by the user you've listed.
Edit: I'm running Pinchflat with a user specified in Compose services, and it works.
I cant recall... I was using portainer and have the config in github... make change and then 'pull and redeploy'.
I dont have any on going issues, but I typically delete the content from a share instead of via the UI due to how I manage the content.
I mean to say, doing this will work if you chown and chmod your volumes.
version: "3.9"
services:
pinchflat:
image: ghcr.io/kieraneglin/pinchflat:latest
container_name: pinchflat
hostname: pinchflat
ports:
- "8945:8945"
volumes:
- /mnt/raid6/pinchflat:/config
- /mnt/raid6/media_share/Series:/downloads
environment:
- TZ=America/New_York
- - UMASK=000
+ user: 1000:1000 # or whatever user and group ID you need
restart: unless-stopped
chown -R 1000:1000 /mnt/raid6/pinchflat /mnt/raid6/media_share/Series
# make sure to revert the permissions bits to whatever you need
# and make sure other applications using /mnt/raid6/media_share/Series have access to it
My raid is owned by that user and group. Next time I fiddle with things I'll take a stab at it.
Maybe my user value was not defined correctly in my yml file. I'm new to docker management so I could have errored there.
I appreciate your assistance. I'll report back soon.