Re: lo and security

From: Einar Karttunen <ekarttun(at)cs(dot)Helsinki(dot)FI>
To: "Thomas T(dot) Thai" <tom(at)minnesota(dot)com>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: lo and security
Date: 2001-05-18 08:14:36
Message-ID: Pine.LNX.4.30.0105181110111.14271-100000@melkinpaasi.cs.Helsinki.FI
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 18 May 2001, Thomas T. Thai wrote:

> i'm making a photo album app with php4 and pgsql. i came across something
> i think could be a security risk.
>
> i have a web page with a form for user to upload their image, then using
> INSERT and lo_import() i get the file to the right location. the problem
> is this, with one postmaster running as uid pgsql, that would allow any
> other developer to view my data just by guessing the path to my images
> cause they all get read by user pgsql.
>
> how do i circumvent this?
One trick is to have multiple postmasters with different uids. This works
if the load is not too high. All postmaster are from the same
installation, but use different database-root locations. The other way
would be to encrypt the images but this will probably be not an easy
solution either.

- Einar Karttunen

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2001-05-18 08:27:00 Re: Inserts using plpgsql - Further
Previous Message Thomas T. Thai 2001-05-18 07:59:13 lo and security