• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting A permissions matter about metadata on Linux

     
    • 0 Vote(s) - 0 Average

    A permissions matter about metadata on Linux

    Access rights to metadata by a non-jellyfin user
    Vast
    Offline

    Junior Member

    Posts: 8
    Threads: 2
    Joined: 2025 Jan
    Reputation: 0
    #1
    2025-03-10, 08:41 AM
    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
    sudo setfacl -d -m g:jellyfin:rwx /media/vast/MediaFilesDirectory

    Code:
    getfacl /media/vast/MediaFilesDirectory
    shows:

    # 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.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2025-03-10, 01:36 PM
    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
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    Vast
    Offline

    Junior Member

    Posts: 8
    Threads: 2
    Joined: 2025 Jan
    Reputation: 0
    #3
    2025-03-10, 03:00 PM
    Thank you for your suggestion. If I cannot solve the problem permanently with my present arrangement I'll definitely try what you suggest.
    Vast
    Offline

    Junior Member

    Posts: 8
    Threads: 2
    Joined: 2025 Jan
    Reputation: 0
    #4
    2025-03-11, 06:55 AM
    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.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #5
    2025-03-11, 12:38 PM
    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.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    Vast
    Offline

    Junior Member

    Posts: 8
    Threads: 2
    Joined: 2025 Jan
    Reputation: 0
    #6
    2025-03-11, 02:18 PM
    Thank you. That's very useful for me. I'll try and find a solution based on this information.
    Vast
    Offline

    Junior Member

    Posts: 8
    Threads: 2
    Joined: 2025 Jan
    Reputation: 0
    #7
    2025-03-11, 02:57 PM
    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.
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode