Jellyfin runs as user jellyfin, which has no permission for your home directory. If you add a directory inside your home directory to a library, Jellyfin fails to access it. You can create a dedicated directory for Jellyfin.
I have used a dedicated directory /mnt/jellyfin which holds all the media. If you want to access it as a regular user add yourself to group jellyfin and set permissions accordingly. Optionally create a link to your home folder.
sudo chown -R jellyfin:jellyfin /mnt/jellyfin # Set ownership to jellyfin user and group sudo chmod 2775 /mnt/jellyfin # Enable setgid and set permissions sudo find /mnt/jellyfin -type d -exec chmod g+s {} ; # Ensure setgid is applied recursively (optional)
chown -R jellyfin:jellyfin: Makes the jellyfin user and group owners of the directory.
chmod 2775: Sets permissions to rwxrwsr-x, allowing the group to read/write/execute and ensuring new files inherit the group.
find ... -exec chmod g+s: Applies the setgid bit recursively to subdirectories (optional if using chmod -R 2775).
2. Add Your User to the Jellyfin Group
bash
Copy
sudo usermod -aG jellyfin $USER # Replace $USER with your username if needed
This grants your regular user access to the jellyfin group.
3. Reload Group Membership
Log out and back in or restart your system for group changes to take effect.
4. (Optional) Create a Symlink in Your Home Directory
bash
Copy
ln -s /mnt/jellyfin ~/jellyfin-media # Creates a shortcut in your home directory
5. Fix Existing File Permissions (If Needed)
bash
Copy
sudo chmod -R g+rwX /mnt/jellyfin # Grants group read/write and directory traversal
g+rwX: Adds read/write for the group and ensures directories are executable.
Is this from Chat GPT ??
( I expected you to visit the arch wiki )
If you have followed the instructions you posted:
you have a folder /mnt/jellyfin owned by user jellyfin.
You can access this folder from your home folder (using a file manager).
You can add any folder created within this jellyfin folder to a jellyfin media library. (I assume you know how to set up libraries in jellyfin)
Only problem with the steps you mentioned is using chmod -R 2775. Using mod 2775 or 775 allows any user to read data from the folder. If you followed these steps already simply run sudo chmod 770 /mnt/jellyfin.