Damianofds / ansible-provisioning

Install PostGIS, java and 2 tomcat instances on a vagrant VM or on your own production VM
Apache License 2.0
0 stars 0 forks source link

Grant on schema public #3

Open Damianofds opened 8 years ago

Damianofds commented 8 years ago

as best practice PostGIS is installed in public schema. the user geoserver must have privileges on table/view/functions to use it. (use ALTER DEFAULT PRIVILEGES before install the PostGIS extension)

Damianofds commented 8 years ago
postgres=# ALTER DEFAULT PRIVILEGES FOR USER geoserver IN SCHEMA public GRANT ALL ON TABLES TO geoserver;
ALTER DEFAULT PRIVILEGES
postgres=# ALTER DEFAULT PRIVILEGES FOR USER geoserver IN SCHEMA public GRANT ALL ON SEQUENCES TO geoserver;
ALTER DEFAULT PRIVILEGES
postgres=# ALTER DEFAULT PRIVILEGES FOR USER geoserver IN SCHEMA public GRANT ALL ON FUNCTIONS TO geoserver;
ALTER DEFAULT PRIVILEGES
CREATE GROUP pgis_users WITH USER geoserver;
GRANT SELECT ON spatial_ref_sys, geometry_columns TO GROUP geoserver;