Facebook
Twitter
Pinterest
Tumblr
GitHub
RSS
  • About
  • Blog
  • Download
  • Emby Premiere
  • Sign In
  • Support
  • Emby Server
  • Server Management
  • Library Setup
  • Linux/Unix Permissions
Search Results for

    Show / Hide Table of Contents
    • Emby Documentation
    • Emby Server
      • Quick start
      • System Requirements
      • Emby Premiere
      • Installation & Setup
        • Installation
        • Running as Windows Service
        • Server Installation on Shield TV
        • Network Setup
      • Server Management
        • Server Settings
        • Network & Connectivity
          • Connecting from Client Apps
          • Secure Your Server
        • Manage Users
          • Users
          • Parental Controls
          • Passwords
          • Content Access
          • Device Access
          • Emby Connect
          • Admin Password Reset
        • Library Setup
          • Library Setup
          • Folder-based Access Control
          • Linux/Unix Permissions
          • Optional Network Paths
          • New Media Date Handling
        • Manage Metadata
          • Metadata Manager
          • Identify
          • Ordering TV Special/Extras
          • Image Editing & Image Types
        • Transcoding
          • Transcoding
          • Hardware Acceleration
            • Overview
            • Windows
            • Linux
            • Android
        • Scheduled Tasks
        • Log Files
        • Devices
        • Backing up Emby Server
        • Plugin Management
      • Features & Plugins
        • Playback Methods
        • Collections
          • Collections
        • Subtitles
          • Open Subtitles
          • Automatic Subtitle Downloads
          • Manual Subtitle Downloads
        • Extra Content
          • Channel Plugins
          • Cinema Intros
          • Music Lyrics
        • Downloads & Sync
          • Introduction
          • Download Options
          • Offline Access
          • Download Jobs
          • Folder Sync
        • Intro Skip
        • Camera Upload
        • Convert Media
        • Webhooks
        • Notifications
      • Live TV
        • Live TV Setup
        • Live TV Plugins
        • HDHomeRun Setup
        • M3U Tuners
        • Older HDHomeRun Support
        • Emby Guide Data
        • Schedules Direct
        • XML TV
        • Live TV Channel Mapping
        • Manage Channels
        • HDHomeRun Channels
        • NextPVR Tuner
        • VBox TV Gateway Tuner
        • Other EPG Sources
        • DVR Settings
      • Media Preparation
        • Naming Conventions
          • Movie Naming
          • TV Naming
          • Music Naming
          • Audio Book Naming
          • Book Naming
          • 3D Video Naming
          • Subtitles Naming
          • Trailer Naming
          • Theme Media Naming
        • Excluding Files & Folders
        • Media Stubs
        • Strm Files
      • KB Articles
        • Linux
        • Synology NAS
        • Corrupt Database
        • Synology Permissions
        • HWA fails with RDP
        • Manage Collections (Legacy)
        • Manage Playlists (Legacy)
    • Emby Apps
      • Common
        • Emby Connect
        • Keyboard and Remote Support
      • Android Mobile
      • Apple TV
      • Emby Windows
      • Google Home
      • Atmos on LG TV
      • Web App
      • Amazon Alexa
      • Android TV
        • Android TV
        • Android TV Storage Attachment
        • Shield TV Direct File Access
      • Fire TV
        • Amazon Fire TV
        • Manual Install on Fire Tablets
      • Chromecast
      • iOS
      • Roku
      • Emby for Kodi
    • Emby Premiere
      • Emby Premiere
      • Purchasing Premiere
      • Membership Options
      • Feature Matrix
      • Premiere Key Delivery
      • Keys Valid with Emby 4.0
      • Lost Premiere Keys
      • Key Invalid or Missing
      • Upgrade Membership
      • Premiere Limits
      • App Store Price Differences
      • Cancel Subscription
      • Using Multiple Servers
      • Update Credit Card
      • Change Payment Method

    Linux/Unix Permissions

    Excellent advice from user Q-Droid on the Emby Forums

    This is an excerpt from a community thread by a member who wanted to allow other applications and Linux users on their server to access the media structure used by Emby. The member wanted shared read and write access to the libraries which may contain files and directories owned by different users.

    1. Allow group of users (my-user,Emby,Kodi,etc.) to read and write media content.
    2. Allow same for SMB shares.

    Generally speaking you can't prevent Emby from following the rules of the OS and in Linux/UNIX these rules were created for security reasons. A "line of code" won't change that because only the superuser is allowed to change ownership at the user level. Emby doesn't run as superuser and you really don't want to do that anyway. So instead you work with the rules and tools for the OS.

    There are multiple ways to do this, I'll share what I would do. Need elevated rights for this, i.e. root.

    Identify your media base directory. Usually it's the common starting directory for your libraries. For example, if your libraries look like this:

    /mnt/library/movies
    /mnt/library/tv shows
    /mnt/library/music
    

    Then "/mnt/library" is your base. Servers with multiple storage volumes and external drives can have multiple paths to the libraries without a common base. If this is the case then modify each library path individually and pick a directory from which subdirectories will be created, but not "/" and not "/mnt".

    On the Emby server with the media to be shared, create a group for media if it doesn't exist. The group name is arbitrary though it helps to be descriptive: group add media

    Add members to the group (my-user, emby, etc.): usermod -a -G media my-user usermod -a -G media emby ...

    We'll use ACLs. First to set the permissions and then to set the defaults. It can be done in one command but it's easier to follow this way. Members of the media group will be able to access and modify files and directories under /mnt/library. New files and directories will be created with permissions for the media group.

    Set permissions for media group on existing items (the 'X' is upper case): setfacl -R -m g:media:rwX /mnt/library

    Define default permissions for media group. Applies to new items: setfacl -R -m d:g:media:rwX /mnt/library

    If you're using SMB/CIFS you can enforce similar rules. Assuming the users are the same and the group can be added.

    In smb.conf and for each of the shares add to current config: [share name] create mask = 0664 directory mask = 0775 force group = media

    The above should give you enough information to get started with minimal tweaking needed.

    On this Page
    Back to Top 2025 © EMBY LLC. Please see our terms of use and privacy policy.