I have installed Postgres on my UBUNTU VM.
prompt$ sudo -u postgres psql
and entered my linux password. I am getting the message:
could not change directory to "/home/petroman": Permission denied
psql (15.4 (Ubuntu 15.4-1.pgdg22.04+1))
Type "help" for help.
postgres=#
Can anyone help me to fix this?
I have tried reinstalling postgres, restarting the pc. I read that Ubuntu comes with a version of posgres only after I had decided to reinstall postgres. So maybe I caused a problem and caused a deletion of the original and somehow fouled up with my installation.
2
Answers
psql (15.4 (Ubuntu 15.4-1.pgdg22.04+1)) Type "help" for help. postgres=#
telling that you successfuly launched psql client. Don’t see any point to reinstall something, just work with databases/tables/whatever…If you care about permissions warning, then use
sudo - -u postgres psql
instead.Your
/home/petroman
directory does not have the correct permissions, Trychmod og+rX /home/petroman
.