[postgis-users] ownership and permissions on ogr_fdw shapefiles

Richard Greenwood richard.greenwood at gmail.com
Tue Jul 13 14:49:55 PDT 2021


Thanks Paul! It all lives in a shell script so it's not a big deal to reset
the ownership & permissions. But I didn't want to miss out on any fdw
goodness if there was a more elegant way of doing it. I hate looking at my
old scripts and saying "geez, I didn't know very much back then!"

On Tue, Jul 13, 2021 at 3:31 PM Paul Ramsey <pramsey at cleverelephant.ca>
wrote:

> 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
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
>


-- 
Richard W. Greenwood, PLS
www.greenwoodmap.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20210713/f7e765b5/attachment.html>


More information about the postgis-users mailing list