RatingPosterDB / rpdb-folders

Monitors Media Folders and Adds Images with Ratings (poster.jpg / background.jpg) from the RPDB API
GNU Lesser General Public License v2.1
23 stars 2 forks source link

Permissions on posters.jpg not using container PGID/PUID #45

Closed edrock200 closed 2 years ago

edrock200 commented 2 years ago

Did something change in the last release? I started noticing poster.jpg is owned by user/group root, whereas before it was owned by the PUID/PGID set on the env variables on the container.

jaruba commented 2 years ago

@edrock200 Hi, nothing changed in the way that RPDB folders writes files. As the app does not set any file permissions, the files should be created with the same user permissions that are set for the app itself when it is ran.

When using badges though, the app needs to have access to read the video files, as otherwise it cannot analyse them for the badges feature.

I remember you said you started using badges recently, maybe you started the app as root when enabling the badge feature?

edrock200 commented 2 years ago

I didn't. I run it as a docker container. The docker container respects the pgid and puid env values on the container correct? Either way if you didn't change anything it must be something on my end. I'll dig into it. Thanks bud!

jaruba commented 2 years ago

Either way if you didn't change anything it must be something on my end.

@edrock200 i definitely didn't change anything that should affect this in any way..

edrock200 commented 2 years ago

@jaruba what base image do you use for your docker image? Do you have a docker compose you'd be willing to share? (Or if it's already published point me to the file please ) Want to run some tests on this permissions thing. As far as I can tell the container doesn't seem to be respecting the puid and pgid env variables. Not sure if it's image specific or what.

jaruba commented 2 years ago

@edrock200 i use it in docker based on the example from: https://github.com/RatingPosterDB/rpdb-folders-docker/blob/main/README.md

I don't remember ever needing to change the permissions for any docker image (radarr and sonarr either), and everything seems accessible in my installation.

(using the phone, accidentally closed the issue by misspressing)

jaruba commented 2 years ago

I'm currently away on vacation until the 30th of May, and will be on a 2 day business trip after that.

I'll set a reminder for myself to check my installation when I get home on the 30th, but i realistically don't remember setting any specific permissions for the docker container. (also using it on Linux)

edrock200 commented 2 years ago

No worries bud! Enjoy your well deserved vaca! This isn't urgent at all.

edrock200 commented 2 years ago

Hey bud, no worries on this. I was able to resolve. I forked your Dockerfile and added this line before the last "npm start" line, and now it's writing as USER 1000 :)

USER 1000
CMD ["npm", "start"]

I also noticed some fsnotify dependencies were refusing to install, so I added an npm i -f line. seems to be doing ok with it so far. I'll let you know if theres any side effects if you are interested.

jaruba commented 2 years ago

@edrock200 oh, wow.. you can open a PR if you want

srry for the late reply, it takes a bit to get things in order after a longer vacation.

edrock200 commented 2 years ago

Cool. I'm not too familiar with GitHubs workflows but I'll test this out for a few days first and if no issues, I'll try to create one.