Firstly - thank you for writing up the tutorial. It is clearly written up and easy to follow. I just got stuck when things did not go exactly as specified as I'm not super expert.
_______________
No docker in use.
Jellyfin LXC setup script used from
tteck.github.io/Proxmox/. SMB/CIFS in a TrueNAS VM on the same host and NW bridge.
The issue was that the LXC jellyfin user (via jellyfin web-admin portal) could not to see the past the /mnt/nas/ folder.
Whilst the root user (in terminal) could see the media files past /mnt/nas/. Which is likely to mean the UIDs/GIDs between LXC and host where not aligned.
Tried a few ways to change the permissions (chown, chmod, change the permissions levels in fstab up to 777) etc but no dice.
I was about to investigate setting the UID/GID mappings that you can set between LXC and host though manged to get it working before that.
Complicating factors:
* CIFS user ('user_video') is read-only in TrueNAS... maybe the lack of Execute for dir lookups was a sticking point.
Around and around I went... could not get the Jellyfin web-admin portal to see the media
Then I stumbled across the mnt point in the PVE LXC settings and ticked the following.
* Read Only = ticked
* Mount Options = nosuid (no user ID)
This resulted in the following config line in LXC.conf
mp0: /mnt/cifs_shares/nas_ro/,mp=/mnt/nas,mountoptions=nosuid,ro=1
____________________________________________________
Config Notes File
1. In the LXC (run commands as root user)
- groupadd -g 10000 cifs_shares
- usermod -aG cifs_shares jellyfin
- Shutdown the LXC.
2. On the PVE host (run commands as root user)
- mkdir -p /mnt/cifs_shares/nas_ro
- { echo '' ; echo '# Mount CIFS share on demand with ro permissions for use in LXCs (manually added)' ; echo '//192.168.1.XX/Video/ /mnt/cifs_shares/nas_ro cifs _netdev,x-systemd.automount,noatime,uid=100000,gid=110000,dir_mode=0664,file_mode=0664,user=XXXXXX,pass= XXXXXX 0 0' ; } | tee -a /etc/fstab
- mount /mnt/cifs_shares/nas_ro
systemctl daemon-reload
- [1st try]
{ echo 'mp0: /mnt/cifs_shares/nas_ro/,mp=/mnt/nas,ro=1' ; } | tee -a /etc/pve/lxc/XXX.conf
[Nth try]
Add to /etc/pve/lxc/XXX.conf
mp0: /mnt/cifs_shares/nas_ro/,mp=/mnt/nas,mountoptions=nosuid,ro=1
- Start the LXC