Installation UID and GID

My architecture is Ubuntu 18.04 LXC (proxmox). I followed the Jellyfin Repository installation guide.

The Jellyfin team provided Ubuntu repository for installation on Ubuntu automaticaly creates a new system user/group called (jellyfin:jellyfin - 108:114) . The issue is these new UID’s and GID’s are automatically created and random. This creates a permission issue with UID’s/GID’s for my NFS permissions.

Is there a way to install Jellyfin under a existing user during the installation phase? For example, a username media with UID:GID 1105:100?

My work around has been:

  1. Edit Jellyfin System.d Service file
    I added edited the user and added my Group.
    sudo systemctl stop jellyfin && sed -i 's/User = jellyfin/User = media\nGroup = users/' /lib/systemd/system/jellyfin.service

  2. Chown Files for new user access
    sudo systemctl stop jellyfin && sudo chown media:adm /var/cache/jellyfin && sudo chown -R media:users /var/cache/jellyfin/* && sudo find /etc /lib /var -user jellyfin -group adm -exec sudo chown media:adm {} + && sudo find /etc /lib /var -user jellyfin -group jellyfin -exec sudo chown media:users {} + && sudo systemctl restart jellyfin

Any help would be much appreciated.

You could add the jellyfin user to the group which already has access to the files which would then be as simple as

usermod -aG Group jellyfin

Then on restart of jellyfin it should have access to the files with the associated group permissions