Permission problems with Plex on NixOS

Server Version#: 1.40.2.8395-c67dce28e
Player Version#:

I’m new to Plex and fairly new to NixOS also. I’ve already made sure the entire tree of folders and files in my Media/Movies folder structure are in the plex group and I’ve manually chmod 777 and still Plex is unable to read the folder as a Library.
If I run journalctl -u plex.service -p err -f, I see just

Jul 07 19:10:48 PlexMediaServer[47076]: Couldn't check for the existence of file "/home/Jason/Shared/Media/Movies": boost::filesystem::status: Permission denied [system:13]: "/home/Jason/Shared/Media/Movies"
Jul 07 19:10:48 PlexMediaServer[47076]: Couldn't check for the existence of file "/home/Jason/Shared/Media/Movies/.grab": boost::filesystem::status: Permission denied [system:13]: "/home/Jason/Shared/Media/Movies/.grab"

I can see files also if I run
sudo -u plex ls -ld /home/Jason/Shared/Media/Movies/

I’m not sure if I’ve got something wrong with Plex or with my NixOS config but if anyone has any ideas, it’d be super appreciated. I’m not really sure where to go from here.

My entire plex.nix config below if that helps.

{ config, lib, pkgs, vars, ... }:
with lib;
{
  services.plex = {
    enable = true;
    dataDir = "/var/lib/plex";
    openFirewall = true;
  };
  users.users.plex = {
    uid = config.ids.uids.plex;
    group = "plex";
    extraGroups = [ "users" ];
  };
  users.groups.plex = {
    gid = config.ids.gids.plex;
  };
  users.users.Jason = {
      extraGroups = [ "plex" ];
  };

  systemd.tmpfiles.rules = [
    "d /home/Jason 0711 Jason plex - -"
    "d /home/Jason/Shared 0711 Jason plex - -"
    "d /home/Jason/Shared/Media 0770 Jason plex - -"
    "R /home/Jason/Shared/Media - - - - -"
  ];
}

The journalctl message is telling you what’s happening. “Permission Denied” (read permission) is explicit.

You’ll need to look at the permissions.

VERY STRONGLY recommend to NOT put media in your home directory.
Linux is very strict about permissions and some distros have heightened security about home directories. Getting ‘plex’ to read that will require customization.

fwiw, Lixos isn’t a supported distro. If you’re doing this to learn Linux, the recommendation is to stick with a mainstream distribution; Ubuntu, Debian, Fedora, Rocky, etc

Thanks. I am trying to learn NixOS actually but also, I had no idea that the home folders had any extra security measures besides the standard user/group/other permissions.
I moved the Shared/Media folder outside of home and it’s now visible.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.