Unraid Docker File Permissions

Can someone explain how I should set up the Unraid Docker so that files created are read/write via SMB share to an external PC?

I see that new recordings and other files are being created as root with read/write access only to root and all others are read only. I am aware of the plugin to fix file permissions, but I don't want to have to run that all the time. I am interested in the default file ownership=nobody and rw permissions for all. The current docker edit page has PUID=99 and PGID=100, so to me it appears like files should be created by nobody with rw for all.

Got to the shares in unraid and specify the user(s) that you want to have RW access to the share that holds the recordings.

That's not the problem - the shares are setup correctly but new files created by the ChDVR Docker are owned by root with rw/r/r permissions instead of being owned by "nobody" with rw/rw/rw permissions - I thought the PUID and PGID docker variables are supposed to do this correctly...

Edit: I guess I should also mention that I am using the channelsdvr_intel docker from the Unraid App store.

I opened up a terminal under the main unraid page and did "id nobody" and got uid=99, gid=100 but when I open up a terminal from the Channels DVR Docker, I get uid=65534 and gid=65534 - I am not sure if changing the PUID and PGID to 65534 in the Docker setup will cause problems or not - can anyone advise?

Also - added a UMASK variable set to 0 but the Unraid Docker seems to ignore this - umask is 022 in the docker's terminal. The docker I am using is from fancybits/channels-dvr:tve

You should be able to change the permissions with a script that runs as root. Have the script run as needed or kick it off manually.

Thanks - I can run the "Docker Safe New Perms" tool in Unraid to do this - I guess I will table this for now as apparently the docker itself needs to be modified to address this.

This has been an annoyance since the beginning. Devs, would it break anything to have permissions changed in a future release that sets ownership to User=Channels with a UID that doesn't overlap any other commonly used media server apps? Anyone who wants to take advantage of this could then change ownership of the exsisting files once and not have to run a script in the future.

I worked with @tmm1 to setup proper permissions in Freenas from the beginning and I believe @timstephens24 had a community app for Unraid that did the same. Unfortunately, both of these are no longer maintained.

I actually had a docker container that did what you’re asking because I wanted to fixed the same permission issues you’re having. It worked on anything that wasn’t an arm cpu not just unraid, the unraid community app came when I switched from Ubuntu/Snapraid :stuck_out_tongue:

Life caught up with me and I couldn’t really do the support if there were issues, which there were some permission issues with mainly the channels binaries and some other things I didn’t have the time to dedicate to for fixing so that’s why it was archived :sweat_smile:

Just saying all that to give @tmn1 props for not dropping out like I did. There’s some weird issues that pop up, and some of them also depend on the base image that you’re using and you need to keep that updated. You might fix something but there’s different issues that comes because you changed it or an OS update broke something with docker and you spend more time tracking down niche OS issues in the container and not focusing on the software support.