Skip to content

Commit

Permalink
Merge pull request #9903 from IQSS/lessperm
Browse files Browse the repository at this point in the history
fix installer, CREATE instead of ALL for public schema (Postgres 15)
  • Loading branch information
kcondon authored Sep 13, 2023
2 parents ad331c9 + d6727c0 commit ca3da56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/installer/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@

# 3e. set permissions:

conn_cmd = "GRANT CREATE PRIVILEGES on DATABASE "+pgDb+" to "+pgUser+";"
conn_cmd = "GRANT ALL PRIVILEGES on DATABASE "+pgDb+" to "+pgUser+";"
try:
cur.execute(conn_cmd)
except:
Expand All @@ -422,7 +422,7 @@
conn.close()

if int(pg_major_version) >= 15:
conn_cmd = "GRANT ALL ON SCHEMA public TO "+pgUser+";"
conn_cmd = "GRANT CREATE ON SCHEMA public TO "+pgUser+";"
print("PostgreSQL 15 or higher detected. Running " + conn_cmd)
try:
cur.execute(conn_cmd)
Expand Down

0 comments on commit ca3da56

Please sign in to comment.