Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error:"hdiutil: attach failed - Permission denied" , issue in installing cask on external drive #204067

Open
6 tasks done
Ayush-Mgr opened this issue Mar 6, 2025 · 0 comments
Open
6 tasks done

Comments

@Ayush-Mgr
Copy link

Verification

Description of issue

hdiutil: attach failed - Permission denied when installing casks on external drive

I'm encountering a permission error when attempting to install casks using Homebrew on an external drive. Specifically, the error occurs during the hdiutil attach process.

Steps to Reproduce:

  1. Set Cask Installation Directory to External Drive:

    I configured Homebrew to install casks to an external drive by setting the HOMEBREW_CASK_OPTS environment variable:

    export HOMEBREW_CASK_OPTS="--appdir=/Volumes/disk_2/apps"
  2. Verify Directory Permissions:

    Checked the permissions of the target directory:

    ls -ld /Volumes/disk_2/apps

    Output:

    drwxr-xr-x@ 29 yush  staff  986 Mar  6 16:59 /Volumes/disk_2/apps
    
  3. Attempt to Install a Cask (e.g., Blender):

    Executed the following command:

    brew install --cask blender

    Encountered the following error:

    ==> Downloading https://formulae.brew.sh/api/cask.jws.json
    ==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-cask/507608b
    Already downloaded: /Users/yush/Library/Caches/Homebrew/downloads/d914cba5818691ff14efe8c1c80c5da1b857a0c6c49a5a3b6efb794d915a0a5a--blender.rb
    ==> Downloading https://download.blender.org/release/Blender4.3/blender-4.3.2-ma
    Already downloaded: /Users/yush/Library/Caches/Homebrew/downloads/3c619b9faa69ce1cd91337345e353c2a19036146f6082a0824bad3711275e4bd--blender-4.3.2-macos-arm64.dmg
    ==> Installing Cask blender
    hdiutil: attach failed - Permission denied
    ==> Purging files for version 4.3.2 of Cask blender
    Error: Failure while executing; `/usr/bin/env hdiutil attach -plist -nobrowse -readonly -mountrandom /Volumes/disk_2/apps/brew/temp/homebrew-dmg20250306-1279-myckox /Volumes/disk_2/apps/brew/temp/homebrew-dmg20250306-1279-myckox/3c619b9faa69ce1cd91337345e353c2a19036146f6082a0824bad3711275e4bd--blender-4.3.2-macos-arm64.cdr` exited with 1. Here's the output:
    hdiutil: attach failed - Permission denied
    

Additional Information:

  • macOS Version: [Mac mini m4]
  • Homebrew Version: [Homebrew 4.4.23]
  • External Drive Format: [File system format of /Volumes/disk_2]

Troubleshooting Steps Taken:

Granted Full Disk Access to Terminal:

  • Navigated to System Settings > Privacy & Security > Full Disk Access.
  • Added the terminal application and restarted it.

Result: The error persists.

Request for Assistance:

I seek guidance on resolving the hdiutil: attach failed - Permission denied error when installing casks to an external drive using Homebrew. Any insights or recommendations would be greatly appreciated.

Command that failed

brew install --cask blender

Output of command with --verbose --debug

---

Output of brew doctor and brew config

---

Output of brew tap

---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant