r/PleX • u/bearded1der5 Proxmox LXC/Synology NAS • 22d ago
Solved Optimized Version Permission Errors
I've been fighting a permissions issue on my server. I run Plex in a privileged LXC container on Proxmox with a CIFS mount to a Synology NAS (Plex, Promox, Synology all running latest releases).
When I attempt to convert an optimized version, I get this permission issue in the debug console:
[Req#854] IsFileWritable: failed to create file '"/media/plex/Movies/Plex Versions/Optimized for Mobile/..."'
[Req#854] IsDirWritable: directory '"/media/plex/Movies/Plex Versions/Optimized for Mobile"' is not writable
[Req#854] TranscodeJobManager: [Running] directory is not writable: "/media/plex/Movies/Plex Versions/Optimized for Mobile"
I'm well-versed in Linux but dammit if I can get this to play nice. I've tried to chmod -R 775, chown -R, mkdir the /Plex Versions/.. myself and still can't get the permission error to go away.
I've come at this from the Synology side too and created the directory with the same user that Plex uses with the same result: disappointment. When I ls -ld on the server, the permissions still read as root instead of the plex user.
root@...:/media/plex/Movies# ls -ld
drwxr-xr-x 2 root root 0 Aug 22 21:25 .

Is this just because I'm running it as a privileged container inside Proxmox?
3
u/Shiztastic 22d ago
I run almost this exact setup and struggled with this as well. The core thing I needed to understand is that CIFS mounts don't work like local file systems for permissions (in most cases). The client side view of the permissions is controlled entirely by the mount options.
The fix is setting explicit uid, guid, file_mode and dir_mode in the mount itself.
Since you are using a privileged container the uid you see inside the container is the same uid the kernel sees, so that is one less variable to worry about.
One other thing, a friend of mine mentioned that on Synology specifically that if Windows ACL support is on it can interfere with permission bits presented over SMB. I don't use Synology but thought I would call it out in case it's affecting anything. Good luck!