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

Postgres permission issue on Mac OS #1815

Open
cmdctrlesc opened this issue Sep 8, 2023 · 0 comments
Open

Postgres permission issue on Mac OS #1815

cmdctrlesc opened this issue Sep 8, 2023 · 0 comments

Comments

@cmdctrlesc
Copy link

Every time I tried to rerun an IHP app on Mac OS I got the 'Problems found while compiling' error message. After some debugging help from some kind people in the IHP Slack we figured out that the problem is Postgres, namely that the data directory has invalid permissions.. The solution to this is sudo chmod <path to data directory in the ihp project> and then typing your password. The catch is however that this has to be done every time the app is stopped and restarted which is certainly cumbersome. Finding a way to fix this permanently would be great.

Detailed steps to reproduce:

  1. Mac OS (currently Ventura, but some earlier versions also had this)
  2. Install Nix according to IHP docs: sh <(curl -L https://nixos.org/nix/install)
  3. Install IHP according to IHP docs: nix-env --install ihp-new
  4. Create IHP project: ihp-new blog
  5. Start server: cd blog then devenv up (or ./start). Everything should be working fine at this point.
  6. Stop server.
  7. Start server again. This is where you get the 'Problems found while compiling error'.
  8. Do make postgres. This is where you will get the above permission error which will include the path to the data directory in question.
  9. Do sudo chmod <path to data directory> and type in your password.
  10. Start server again. Everything will work fine.
  11. Stop and start the server again. Get the 'Problems while compiling' error again.
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