18
0
Fork 0

Amélioration sur la création d'user en RO

This commit is contained in:
emorino 2021-02-02 10:30:17 +01:00
parent 94850c03d8
commit 81d2800045
1 changed files with 3 additions and 0 deletions

View File

@ -339,10 +339,13 @@ $ createuser -P <user>
Il faut ensuite ajuster les droits pour cet utilisateur sur la ou les bases :
**On prend exemple sur la base postgres, mais il faudra vous connecter sur la base concerné avec `psql -d <database>` avec l'user unix postgres**
~~~
postgres=# GRANT CONNECT ON DATABASE <database> TO <user>;
postgres=# GRANT USAGE ON SCHEMA public TO <user>;
postgres=# GRANT SELECT ON ALL TABLES IN SCHEMA public TO <user>;
postgres=# ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO <user>;
~~~