Skip site navigation (1) Skip section navigation (2)


From: Steve Tucknott <steve(at)retsol(dot)co(dot)uk>
To: PostGreSQL <pgsql-novice(at)postgresql(dot)org>
Subject: lo_export
Date: 2004-11-18 17:56:33
Message-ID: 1100800595.2856.7.camel@retsol1 (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
PostGreSQL 7.4.5 (RedHat 8)

We have images stored in the database, that our application allows the
user to export (using lo_export), update, and then reimport. How do I
get around the permissions issue?
The user connects to the database as, say, 'user1' - this is fine. The
lo_export (server command) exports as postgres::users with permissions
of 644. User1, cannot then edit the image, as they do not have

Is there a way of changing postgres's (lo_export's?) default umask? I
have tried changing it in /etc/profile (targetted at postgres LOGNAME) -
in the .bash_profile for postgres, and also in pg_ctl (for the start up)
- but I can't appear to change it. So presumably, there's another way of
doing this?

PS I've also tried setting the target directory as g+s - that's ok to
the point that the file is then created with the group of the directory
- but obviously still not correct permissions to edit the file.


Steve Tucknott

ReTSol Ltd

DDI: 01903 828769


pgsql-novice by date

Next:From: alexDate: 2004-11-18 18:22:53
Subject: multi-homed box
Previous:From: Bruno Wolff IIIDate: 2004-11-18 17:31:54
Subject: Re: upgrade from postgres 7.3.2

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group