Error Codes Wiki

Mac Permission Denied EACCES Error Fix

Warningmac application

Overview

Mac EACCES Permission Denied error occurs in Terminal when you lack permission to access a file or directory.

Key Details

  • Error: EACCES — Permission denied
  • Category: macOS Terminal/Application Error
  • Cannot read, write, or execute the file
  • Common with npm, homebrew, and development tools

Common Causes

  • File owned by root or another user
  • npm global packages installed with sudo
  • Homebrew permissions changed
  • System Integrity Protection blocking access

Steps

  1. 1Fix npm permissions: mkdir ~/.npm-global && npm config set prefix ~/.npm-global
  2. 2Fix Homebrew: sudo chown -R $(whoami) /usr/local/
  3. 3Use sudo cautiously for one-time commands
  4. 4Check file permissions: ls -la /path/to/file

Tags

macmac-applicationmac error eaccesmacosapple

Frequently Asked Questions

Global npm packages were installed with sudo. Fix by changing the npm prefix.