Skip to content

LaunchAgent scheduling fails when home directory is on non-boot volume #550

@spendolas

Description

@spendolas

New Issue Checklist

  • I updated Pearcleaner to the latest version and still observe the issue
  • I searched for existing GitHub issues
  • OS Version: 26.3.1 (25D2128)
  • Pearcleaner Version: 5.4.3 (Build 121)

Issue:

When the user's home directory resides on a non-boot volume (e.g. a secondary internal or external drive mounted at /Volumes/), enabling Homebrew auto-update scheduling fails with "Failed to register LaunchAgent: Bootstrap failed: 5: Input/output error".

Root cause: macOS launchd refuses to load plists from non-boot volumes for security reasons. Since Pearcleaner writes the plist to ~/Library/LaunchAgents/, and that path resolves to /Volumes/<DriveName>/Users/<username>/Library/LaunchAgents/, launchd rejects it. The actual error from log show:

Caller specified a plist with bad ownership/permissions: path = /Volumes/<DriveName>/Users/<username>/Library/LaunchAgents/com.alienator88.Pearcleaner.homebrew-autoupdate.plist

Suggested fix: Detect that $HOME is on a non-boot volume and write the plist to /Library/LaunchAgents/ (system-level) instead, with root:wheel / 644 permissions.

Steps:

  1. Have home directory on a non-boot volume (e.g. /Volumes/<n>/Users/<username>/)
  2. Enable Homebrew auto-update scheduling in Pearcleaner
  3. Observe "Failed to register LaunchAgent: Bootstrap failed: 5: Input/output error"

Screenshots:

N/A

Debug Console

 N/A 

Console Logs

 N/A 

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions