Skip to main content
AllDevToolsHub
Back to error codes
ERROR EACCES

EACCES, Permission Denied

Node.js Error

The process does not have permission to perform the requested operation.

Root Cause

Trying to bind to a privileged port (< 1024) without root, accessing a file without read/write permission, or creating a file in a restricted directory.

How to Fix

Use a port above 1024 for development. Use sudo for privileged operations. Fix file permissions with chmod.

Quick Summary

EACCES means permission denied. Common causes: binding to a port below 1024 (requires root), accessing a file without permission, or writing to a restricted directory.

Key Takeaways

Key Takeaways

  • Ports below 1024 require root/admin privileges
  • Use a port above 1024 for development (3000, 8080, etc.)
  • Fix file permissions: chmod 644 file.txt or chmod 755 directory
  • Never run your app as root to avoid this, use authbind or a reverse proxy instead
Use Cases

When to use it

  • Trying to bind to port 80 without root
  • Accessing a file owned by another user
  • Writing to /etc or /usr without sudo
Watch out

Common Mistakes

  • Running the app as root to fix EACCES, use authbind or a reverse proxy (Nginx) instead
FAQ

EACCES EACCES, Permission Denied, Frequently Asked

How do I run on port 80 without root?

Use a reverse proxy (Nginx) that listens on port 80 and forwards to your app on port 3000. Or use authbind on Linux.

Still having issues?

Check your network logs or use our developer tools to inspect headers, decode tokens, or validate your requests.