Open Damianofds opened 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;
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)