• 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 SOLVED: MacOS demands you assign access to programs explicitly (see below)

     
    • 0 Vote(s) - 0 Average

    SOLVED: MacOS demands you assign access to programs explicitly (see below)

    process run via launchctl cannot read media directory (but calling shell script can)
    cashewtree
    Offline

    Junior Member

    Posts: 12
    Threads: 3
    Joined: 2024 Jan
    Reputation: 0
    Country:United States
    #1
    2024-08-31, 08:20 PM (This post was last modified: 2024-09-01, 03:12 AM by cashewtree. Edited 1 time in total.)
    Background:

    Jellyfin was running fine until the most recent MacOS software update.  I am now at:

    ProductName: macOS   (arm64)
    ProductVersion: 14.6.1  (Sonoma Archer)
    BuildVersion: 23G93

    I have my Mac Mini set up as a media server to mount the external volume and launch jellyfin on boot.  This was working fine, but now some security enhancements are preventing the jellyfin process from reading the external volume where I have my media.

    1.) The server starts up fine when launched manually from a terminal as user jellyfin.
    2.) The shell script that launches it can read the external volume fine (again it is run as user jellyfin).
    3.) The meat of the launch script (in Bash) does the following:

    (Checks if the Volume is accessible, waiting for the mount to return)

    declare -r JELLYFIN='/Applications/Jellyfin.app/Contents/MacOS/jellyfin'
    declare -r WEBDIR='/Applications/Jellyfin.app/Contents/Resources/jellyfin-web'
    declare -r FFMPEG='/Applications/Jellyfin.app/Contents/MacOS/ffmpeg'
    declare -r DATADIR='/Users/jellyfin/.local/share/jellyfin'
    declare -r CONFIGDIR='/Users/jellyfin/.local/share/jellyfin/config'

    exec "$JELLYFIN" --webdir    "$WEBDIR" \
                        --ffmpeg    "$FFMPEG" \
                        --datadir  "$DATADIR" \
                        --configdir "$CONFIGDIR"

    4.) The salient error (after adjusting logging.json to "Debug") is:
    System.UnauthorizedAccessException: Access to the path '/Volumes/EXTHDD/Movies/The Primevals (2023) [imdbid-tt9352178]/logo.png' is denied.
    ---> System.IO.IOException: Operation not permitted
      --- End of inner exception stack trace ---
      at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
     
    5.) I know the calling shell script can access this file (a preliminary ls -l shows it without a problem when launched using launchctl).  I think somehow a security context is being applied to the jellyfin process itself.  I have no idea how to probe further or if I can just apply some sort of access control change.

    6.) The app is run on bootup using launchctl, with the following plist:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
        <key>Label</key>
        <string>vip.a8545eff.jellyfin</string>
        <key>EnvironmentVariables</key>
        <dict>
          <key>PATH</key>
          <string><![CDATA[/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/homebrew/bin:/opt/homebrew/sbin]]></string>
          <key>HOME</key>
          <string><![CDATA[/Users/jellyfin]]></string>
        </dict>
        <key>UserName</key>
        <string>jellyfin</string>
        <key>GroupName</key>
        <string>staff</string>
        <key>InitGroups</key>
        <true/>
        <key>ProgramArguments</key>
        <array>
            <string>/opt/homebrew/bin/bash</string>
            <string>/Users/jellyfin/bin/start-jellyfin</string>
        </array>
        <key>KeepAlive</key>
        <true/>
        <key>RunAtLoad</key>
        <true/>
    </dict>
    </plist>

    I spoke too soom, the script can "ls" the file, but cannot read it:

    shasum: /Volumes/EXTHDD/Movies/The Primevals (2023) [imdbid-tt9352178]/logo.png: Operation not permitted
    Go to solution
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    Messages In This Thread
    MacOS demands you assign access to programs explicitly (see below) - by cashewtree - 2024-08-31, 08:20 PM
    RE: MacOS upgrade broke my MacOS Media Sever - by cashewtree - 2024-08-31, 08:34 PM
    RE: MacOS upgrade broke my MacOS Media Sever - by cashewtree - 2024-08-31, 08:55 PM
    RE: MacOS upgrade broke my MacOS Media Sever - by gnattu - 2024-09-01, 03:08 AM
    RE: MacOS upgrade broke my MacOS Media Sever - by cashewtree - 2024-09-01, 03:10 AM
    RE: MacOS upgrade broke my MacOS Media Sever - by gnattu - 2024-09-01, 03:12 AM
    RE: MacOS demands you assign access to programs explicitly (see below) - by cashewtree - 2024-09-01, 03:15 AM

    • 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