Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

1.1K
Views
Permission denied error when trying to run postgresql on Homebrew

I ran brew install postgresql:

  1. Then brew services start postgresql

Received Error: Permission denied @ apply2files - /Users/$USER/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

  1. Ran chmod 755 ~/Library/LaunchAgents and cp /usr/local/opt/postgresql/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/ (from https://coreyward.svbtle.com/fixing-homebrew-postgres-installation-on-macos-catalina)

This gave me Error: Permission denied @ rb_sysopen - /Users/$USER/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

  1. I tried various things from this thread https://gist.github.com/irazasyed/7732946 but with no success.

I'm not too familiar with Homebrew and am wondering how to resolve this. Thanks!

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

I'm running on a Macbook Air m1.

When I ran:

brew services start postgresql

I got the following error:

Error: Permission denied @ rb_sysopen - /Users/<username>/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

Instead of doing what you posted I did the following:

sudo chown <username> /Users/<username>/Library/LaunchAgents/

And that made it work. I got the idea from this github thread: https://github.com/Homebrew/homebrew-services/issues/177#issuecomment-450432567

over 4 years ago · Santiago Trujillo Report

0

You can run these two commands, it is working for me.

% chmod 755 ~/Library/LaunchAgents
% cp /usr/local/opt/postgresql/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/

To read more about what's going on, you can check below link : Source : https://coreyward.svbtle.com/fixing-homebrew-postgres-installation-on-macos-catalina

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!