Server Version#: 1.40.4.8679
Player Version#: 4.132.2
My setup:
Ubuntu server 24.04 LTS (Noble)
OptiPlex 3040, Core 5, 8GB DDR3, 256GB SSD
Media directories are on NSF mounted NAS share.
The issue:
Every time I add a media file (movie) or folder (TV show season) to NAS, I need to manually grant access to ‘plex’ in order for the server to see the new addition.
sudo chown -R plex:plex <media_folder>
Is there a suggested/supported way to avoid having to execute this step every time? Should I change the account that governs the service to match one that copies files to NAS? Is there a better way?
add plex to HEXYEBO. As long as the group has read permission, plex will see the new media. You’re effectively doing the same thing as the usermod command, so either way is really ok. Whatever you’re most comfortable with.
Just remember that you will need to periodically give group write permission occasionally to any media you may want to delete through the app or web interface.
When you specify a different username for PMS to run as,
– using /etc/defaults/plexmediaserver (SYSV)
– using /etc/systemd/system/plexmediaserver.service.d/override.conf (systemd)
The package installer detects the User= and Group= statements.
It then does everything necessary to grant that username access to the hardware transcoding group
Please review:
As confirmation of your configuration changes (on DEB-based installations) it will print a configuration summary of what it will launch PMS as.
@napolij , @ChuckPa
Thank you both. Modifying /etc/group helped. Although I had to scan the library manually (set to auto and hourly scans) to see the new file in the UI. Probably unrelated.
I will check out your other suggestions at a later time. The goal is to reduce manual intervention with the file permissions, not everyone on my house is command-line friendly.
Thanks for these tips CheckPA. I’ve been working on implementing them. I created the over ride.conf file and now have plex running as me on my media server pc. That all seems to run fine. I didn’t override the group, so my files & directories are owned by me:plex. I did the setguid thing and that seems to propagate the group fine. I must be doing something wrong because the group write does not propagate. I have “UMask=0002” in the override.conf file. No matter what I do, when I try “systemctl show plexmediaserver”, it always tells me the UMask is 022. This is verified since my OTA recordings are set to 644. I’ve tried adding umask 002 to my .bashrc & .bash_profile but that doesn’t seem to do anything which makes sense since I think they only apply to login shells. My plex server is running Fedora if that makes any difference. I’m stumped why the UMask setting doesn’t seem to have any effect.
Looks like I have it sorted out. I found an example UMask setting in multi-user.target.wants/rsyslog.service “UMask=0066” It made me wonder if systemd didn’t like the comment following the UMask setting. So I edited that line so that it was only “UMask=0002”. Now “systemctl show plexmediaservice” shows that as the running UMask.
I’ve got a test recording set up to verify its working properly now but I’m pretty confident it will
As expected, that worked perfectly. Just to verify, I re-edited the override.conf file and appended a comment character on the UMask line. After reloading the systemctl daemon, UMask reverted back to 0022. So that comment was the culprit.
Now if I can get sftp to bend the knee when I drag and drop media from my laptop to the media server, I’ll be happy. I think it tries to preserve whatever permissions a media file has on the laptop.
@napolij , @ChuckPa
Sorry, lost focus of this due to work stuff.
I think I resolved my initial issue by adding User=hex Group=hex to /etc/systemd/system/plexmediaserver.service.d/override.conf
Then I took back the ownership of all media directories with chown -R
Did not mess with Umask as there seems to be no need to ATM.
Let’s see how PMS behaves once the next update rolls around.