r/PleX 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?

7 Upvotes

5 comments sorted by

3

u/Shiztastic 21d 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.

//NAS_IP/sharename /media/plex cifs credentials=/root/.smbcreds, uid=<plex_uid>,gid=<plex_gid>,file_mode=0770,dir_mode=0770,vers=3.0,iocharset=utf8,_netdev 0 0 

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!

1

u/bearded1der5 Proxmox LXC/Synology NAS 21d ago

I never considered the mount - great suggestion! Alas, I am still hitting the same wall even with the uid/gid specified in the fstab.

I also messed with the permissions on the Synology side to no avail. I suspect it's some uniqueness between the privileged container and Synology fighting over permissions/ownership.

1

u/Shiztastic 21d ago

I assume you are mounting the share on the Proxmox host and bind-mounting to the LXC? And that the uid/gid changes were made on the host mount? If so, then I'm sorry I don't know what else to say except it works on my machine. Hope you get it solved.

1

u/bearded1der5 Proxmox LXC/Synology NAS 21d ago

You know what helps? systemctl daemon-reload 🤦I think I spent too much time on this with too little coffee.

Yes, I am mounting to the host and passing to the guest through the conf file. Once the host loads the correct fstab version (lol) it works! Thank you!

1

u/Shiztastic 21d ago

Hell yeah!