lo_export

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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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
permission.

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.

Regards,

Steve Tucknott

ReTSol Ltd

DDI: 01903 828769

Responses

Browse pgsql-novice by date

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