mergerfs
mergerfs copied to clipboard
Permissions issue when using jellyfin with mergerFS
Any clue on how to make jellyfin work under mergerFS?
Describe the bug
When I attempt to launch jellyfin on Ubuntu 20.04 while mounting volumes located at a mergerFS pool, I could get jellyfin scan the media folder.
To Reproduce
- Set up jellyfin with regular filesystem
- Create mergerfs pool at /home/user where ALL my media is located in /home/user/rtorrent/download. I have 4 hard drivers (/dev/sdb, dev/sdc, dev/sdd, dev/sde). And I use mergerfs to merge them into a 44TB pool.
and My mergerfs option is as follows.
/mnt/sd* /home/user fuse.mergerfs defaults,nonempty,allow_other,use_ino,minfreespace=150G,ignorepponrename=true,cache.files=partial,dropcacheonclose=true,category.create=mfs,fsname=mergerfs 0 0 - Add jellyfin to user group and
sudo setfacl -R -m u:jellyfin:rx /home/user/rtorrent/downloadto make sure jellyfin has the right permission.
but jellyfin can't scan the media folder (/home/user/rtorrent/download) at all.
every time I tried to add /home/user/rtorrent/download to jellyfin, it got blank.

I can only add the folders one by one like this into jellyfin, then it can scan and add them to the library.
/mnt/sdb/rtorrent/download /mnt/sdc/rtorrent/download /mnt/sdd/rtorrent/download /mnt/sde/rtorrent/download
any clude to fix this? Thanks.
Are you saying that as the jellyfin user you're unable to access the directory? And you're using extended ACLs rather than regular POSIX ACLs?
- Do you really need to use extended acls? It is more expensive than regular acls due to using xattrs.
- Did you try with
posix_acl=true?
From the docs: posix_acl=BOOL: Enable POSIX ACL support (if supported by kernel and underlying filesystem). (default: false)
As a note I ran into some time ago, mergerfs caches supplemental users/groups. "if a user is added to a group it may not be picked up without the restart of mergerfs." It looks like you're adding the ACL, so I'd look to @trapexit 's answer but just in case you're using supplementary groups, watch that quirk.
See Supplemental user groups in the docs.