![]() |
A permissions matter about metadata on Linux - Printable Version +- Jellyfin Forum (https://forum.jellyfin.org) +-- Forum: Support (https://forum.jellyfin.org/f-support) +--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting) +--- Thread: A permissions matter about metadata on Linux (/t-a-permissions-matter-about-metadata-on-linux) |
A permissions matter about metadata on Linux - Vast - 2025-03-10 I'm using Jellyfin v.10.10.6 on TUXEDO OS 4 (Ubuntu based). I noticed that the metadata files including the trickplay directories and their content have jellyfin as owner and group respectively. The media files themselves (mostly mkv) have my username as owner and group. One problem that arises is that I cannot delete directly the metadata, because I'm not trying to do it as jellyfin. The only practical way that I know to have permission to delete metadata without being jellyfin as owner is to use the following to set default ACLs on the parent directory where the metadata are kept: Code: sudo setfacl -d -m u:vast:rwx /media/vast/MediaFilesDirectory Code: getfacl /media/vast/MediaFilesDirectory # file: media/vast/MediaFilesDirectory # owner: vast # group: vast # flags: -st user::rwx user:vast:rwx group::rwx group:jellyfin:rwx mask::rwx other::r-x default:user::rwx default:user:vast:rwx default:group::rwx default:group:jellyfin:rwx default:mask::rwx default:other::r-x Although the above works, I'm wondering if I could have installed jellyfin in a different way in order to avoid the issue about deleting metadata as the user that normally uses the PC. RE: A permissions matter about metadata on Linux - TheDreadPirate - 2025-03-10 Why not use sudo? Another option is to create a new group and add yourself and jellyfin to this group, recursively chgrp to set this new "media" group (or whatever you want to call it) as the group owner. To ensure that newly created files and folders retain this group ownership you'd need to set a group sticky bit. Code: sudo chown -R g+s /media/vast/MediaFilesDirectory RE: A permissions matter about metadata on Linux - Vast - 2025-03-10 Thank you for your suggestion. If I cannot solve the problem permanently with my present arrangement I'll definitely try what you suggest. RE: A permissions matter about metadata on Linux - Vast - 2025-03-11 I couldn't get it to work. My Linux knowledge is very pitiful. I created a group named "media" and I added my user, that is "vast", and "jellyfin" to it. Metadata files that are created by Jellyfin inside /media/vast/MediaFilesDirectory show owner "jellyfin" and group "media". I tried as user vast to delete these metadata files, but it's not possible. RE: A permissions matter about metadata on Linux - TheDreadPirate - 2025-03-11 Who is the owner of the folder? You should be the owner of all the folders, media the group owner, with 770 permissions on the folder. IIRC, if you are the owner of the folder you can delete files owned by other users in that folder. And since Jellyfin is part of the media group, it can write to the folders. Since it isn't the owner of the folder it can't delete files owned by other users. RE: A permissions matter about metadata on Linux - Vast - 2025-03-11 Thank you. That's very useful for me. I'll try and find a solution based on this information. RE: A permissions matter about metadata on Linux - Vast - 2025-03-11 I've hit a snag. I realized that when Jellyfin creates metadata, including Trickplay directories, the owner of the directories is jellyfin. Therefore, I cannot automatically be the owner of those directories. The easiest solution seems to be for me to run an ad hoc command to change the owner of metadata directories that are created by jellyfin and maybe other files with similar permissions too. I'll then be able to delete them as necessary. |