• 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 Directories and directory permissions

     
    • 0 Vote(s) - 0 Average

    Directories and directory permissions

    awake
    Offline

    Junior Member

    Posts: 9
    Threads: 3
    Joined: 2023 Jul
    Reputation: 0
    Country:Germany
    #1
    2025-03-31, 03:12 PM (This post was last modified: 2025-03-31, 03:15 PM by awake. Edited 2 times in total.)
    Hello everyone! I've installed Jellyfin using Docker because setting it up with a compose file seemed to be the most straight forward way to do it. Howver, I've had some hiccups when it came to directory- and file-permissions.

    My compose file looks like the following with 1001 being the ID for my user and group (both having the same name (richard)):

    Code:
    services:
      jellyfin:
        image: jellyfin/jellyfin
        container_name: jellyfin
        user: 1001:1001
        network_mode: 'host'
        volumes:
          - /home/richard/jellyfin/config:/config
          - /home/richard/jellyfin/cache:/cache
          - type: bind
            source: /home/richard/cinema/Movies
            target: /media/movies
          - type: bind
            source: /home/richard/cinema/Shows
            target: /media/shows
            read_only: true
        restart: 'unless-stopped'
        # Optional - alternative address used for autodiscovery
        environment:
          - JELLYFIN_PublishedServerUrl=http://<my_ip>:8096
        # Optional - may be necessary for docker healthcheck to pass if running in host network mode
        extra_hosts:
          - 'host.docker.internal:host-gateway'
        devices:
          - /dev/dri/renderD128:/dev/dri/renderD128 # I use this because I'm using QSV and have to use it according to the documentation, right?

    As you can see, I'm mounting the media from the home directory. I'm at the same time I'm accessing the cinema directory from a computer with a user with elevated priviledges ("admin"). The problem occurs if I paste a file from my computer (via SMB, macOS is not particularly great in this area it seems but I diverge) into the cinema directory, it's being pasted with "admin" as user and group. This leads to "richard" not being able to play the file in Jellyfin and I have to chmod the newly added files/directories to be able to play the files.

    Should I move the entire mount point to a more public space such as /media and will this even solve my problem?
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2025-03-31, 03:31 PM
    General speaking, I recommend against having media in your home directory if other users may be accessing your home directory. Your home directory is for private and sensitive files and no one else should have access to it.

    /media or /mnt are common places to host files and folders that many users will access.
    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]
    awake
    Offline

    Junior Member

    Posts: 9
    Threads: 3
    Joined: 2023 Jul
    Reputation: 0
    Country:Germany
    #3
    2025-03-31, 03:42 PM
    (2025-03-31, 03:31 PM)TheDreadPirate Wrote: General speaking, I recommend against having media in your home directory if other users may be accessing your home directory.  Your home directory is for private and sensitive files and no one else should have access to it.

    /media or /mnt are common places to host files and folders that many users will access.

    Thank you for the heads up and quick answer! I think I will migrate today and see if it simplifies things for me. Since I don't have tons of media, I think it won't take that long, too. Would you move the config directories as well?

    Also when talking about best practices (knowing that this forum is not a place to discuss Linux things), would you recommend that I also move my personal files (e.g. family pictures and such) from the home directory of SMB shares? I know this is very far from Jellyfin and basically a data management question but since you seem to have at least any kind of opinion on this, I thought I could ask.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #4
    2025-03-31, 04:03 PM
    (2025-03-31, 03:42 PM)awake Wrote: Would you move the config directories as well?


    Depends.  Since the container runs as your user, its fine to leave it in your home directory.  Personally, I keep all my container's data in a root level folder (/docker) since I run a bunch of containers, many that run as users other than me.  It also simplifies backups to keep the containers all together.  If you only intend to run Jellyfin, just leave your /config directory where it is.

    (2025-03-31, 03:42 PM)awake Wrote: Also when talking about best practices (knowing that this forum is not a place to discuss Linux things), would you recommend that I also move my personal files (e.g. family pictures and such) from the home directory of SMB shares? I know this is very far from Jellyfin and basically a data management question but since you seem to have at least any kind of opinion on this, I thought I could ask.

    Depends on whether your SMB share requires credentials or allows guest users.  If you require credentials and prohibit guest users, it is probably fine.
    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]
    1
    « 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