[postgis-users] ownership and permissions on ogr_fdw shapefiles

Paul Ramsey pramsey at cleverelephant.ca
Tue Jul 13 14:30:41 PDT 2021


ogr must be removing and re-writing the files, so you're getting the ownership of the writing process, which is the postgres daemon. No way to change that (except running your daemon under the ownership you want!! (don't)). A cron job may have to suffice.

P

> On Jul 13, 2021, at 2:26 PM, Richard Greenwood <richard.greenwood at gmail.com> wrote:
> 
> I'm using ogr_fdw to delete and insert rows in shapefiles from postgis tables. The operations change the ownership and permissions of the files. Is it possible to control ownership and permissions with ogr_fdw or do I need to do that outside of psql. For example, before my sql operations on the ogr_fdw tables they look like:
> -rw-rw---- 1 rich postgres 465K Jul 13 15:08 GUERNSEY_PARCELS.dbf
> -rw-rw---- 1 rich postgres  96K Jul 13 15:08 GUERNSEY_PARCELS.shp
> -rw-rw---- 1 rich postgres 5.2K Jul 13 15:08 GUERNSEY_PARCELS.shx
> and after:
> -rw------- 1 postgres postgres 465K Jul 13 15:18 GUERNSEY_PARCELS.dbf
> -rw------- 1 postgres postgres  96K Jul 13 15:18 GUERNSEY_PARCELS.shp
> -rw------- 1 postgres postgres 5.2K Jul 13 15:18 GUERNSEY_PARCELS.shx
> I'd like the ownership & permissions to not change.
> 
> Thanks,
> Rich
> -- 
> Richard W. Greenwood, PLS
> www.greenwoodmap.com
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users



More information about the postgis-users mailing list