• 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 General Questions How should I manage library permissions on Ubuntu (24.04)

     
    • 0 Vote(s) - 0 Average

    How should I manage library permissions on Ubuntu (24.04)

    I upload files/create folders in my library by FTP but they have the wrong permissions
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2025-04-03, 01:21 PM (This post was last modified: 2025-04-03, 01:29 PM by TheDreadPirate. Edited 2 times in total.)
    The jellyfin user does not have a shell with which to log in to for the purposes of file transfer.  What you've described, changing the ownership to jellyfin is the simplest solution.  But I also found this annoying and used the process below.

    You can set sticky bits to ensure that the jellyfin user has, at least, read access.  This is what I do.  My user owns the library, the jellyfin user has read access via setting the group for the library to jellyfin.  Setting a sticky bit on the group will ensure that all newly created files and folders in your library have the group ownership set to jellyfin.  An example is below.  Notice the "s" in the group permissions.  That indicates there is a sticky bit.  All files and folders created in this directory inherit the sticky bit and ownership.

    Code:
    chris@rat-trap:/media/library$ ll -d /media/library
    drwxr-sr-x 22 chris jellyfin 22 Apr  3 09:13 /media/library/
    chris@rat-trap:/media/library$ mkdir test
    chris@rat-trap:/media/library$ ll -d test/
    drwxrwsr-x 2 chris jellyfin 2 Apr  3 09:13 test/
    chris@rat-trap:/media/library$ cd test/
    chris@rat-trap:/media/library/test$ touch testFile
    chris@rat-trap:/media/library/test$ ll
    total 34
    drwxrwsr-x  2 chris jellyfin  3 Apr  3 09:14 ./
    drwxr-sr-x 23 chris jellyfin 23 Apr  3 09:13 ../
    -rw-rw-r--  1 chris jellyfin  0 Apr  3 09:14 testFile

    The exception being if you copy files from outside your library, but are already on your server, and you use the -p option to preserve the file's/folder's permissions and ownership.  If you copy without the -p option, it should inherit the sticky bit and ownership.

    Files transferred with FTP should be considered "new" files and should inherit the sticky bit and ownership.

    Use this command to recursively set permissions and the sticky bit.  Replace the username with your user and the path for your library path.  You should only need to do this once.  Going forward, assuming you don't copy in files or folders with -p, jellyfin should be able read anything you transfer in here without having to change ownership or permissions.

    Code:
    sudo chown -R chris:jellyfin /media/library
    sudo chmod -R 750 /media/library
    sudo chmod -R g+s /media/library
    sudo find /media/library -type f -exec chmod 640 {} \;

    If jellyfin needs write access to your library, change 750 to 770 and 640 and 660.
    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]
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    Messages In This Thread
    How should I manage library permissions on Ubuntu (24.04) - by ambrose - 2025-04-02, 10:00 PM
    RE: How should I manage library permissions on Ubuntu (24.04) - by TheDreadPirate - 2025-04-03, 01:21 PM
    RE: How should I manage library permissions on Ubuntu (24.04) - by ambrose - 2025-04-03, 08:32 PM
    RE: How should I manage library permissions on Ubuntu (24.04) - by TheDreadPirate - 2025-04-03, 08:53 PM
    RE: How should I manage library permissions on Ubuntu (24.04) - by ambrose - 2025-04-07, 08:53 PM

    • 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