I am migrating from a UGreen to another NAS running TrueNAS. I am installing Docker containers and getting Plex from here:
I have a media user and group and have configured the Plex container to run as that user. The /data is mapped to a dataset called media that has permissions where everything is owned by the media user and media group. It is exported as an SMB to make it easier for me to connect and add media.
This works great.
My problem is when I do connect and add media. I connect as user ‘brian’ which is a member of the media group, so I have no trouble connecting to the SMB and uploading movies, etc. They are saved as owned by brian.
From inside the plex container, I can see the new files under /data with their oddball numeric owner (brian outside the container). But plex apparently can’t see them and doesn’t notice the change until I do a chown from TrueNAS. I thought the permissions would be ok since both media and brian are members of the media group, which is applied to the file.
I would like a solution where I can upload files to the media share as brian and have plex see them. This happened on the UGreen using their otherwise funky OS.
I suppose I could connect to the share as the media user but right now that user has no password and minimal privs, including no SMB.
Add the ‘media’ group to the permissions to the directories for each media type, with permission inheritance. I do this from Windows in the security settings for the directory in the share (Properties → Security tab → Advanced). Note: My server is not running on Windows. I’m just changing this from a Windows client connected to the SMB share.
That way when you add new files to the directories, they get the ‘media’ group access added to them, and Plex can read them since it is running with the same user group. It wont matter what the owner username of the files is if the media group has permission to the files, too.
This looks like it will work a treat! I was able to set the inheritance permission on the media group (it looked like it already was but it still did some work…) then tested by uploading a new picture. Viola, it immediately appeared in the plex app!
I was hoping I understood groups to do this. I cut my teeth on UNIX in the 80’s and early 90’s, it’s been Windows ever since.
Who knew the answer would be a permissions tweak from the Windows side!