freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] readonly access with freetds and php
- From: "James K. Lowden" <jklowden AT freetds.org>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] readonly access with freetds and php
- Date: Fri, 22 Dec 2006 22:42:30 -0500
Joseph Harth wrote:
> I compiled php and freetds and it works like a charm. I would like to
> disable all kinds of updates to tables and allow only select queries
> with php. I am not sure if this is possible. I could create a user
> with read only access to the tables but scripts could be run under a
> different user that has more rights and open some holes.
A common practice is to make *all* tables read-only (or deny all access
the tables), and write stored procedures to support the application. Grant
privileges as necessary on the procedures to groups. Add users to the
groups. Done. No script can open a hole.
> Not sure if there is a way to
> hack freetds to disable updates deletes and drops of tables but if there
> is a way i would like to do that.
It's not possible. FreeTDS doesn't parse your SQL. It can't distinguish
between SELECT * FROM TABLENAME and DELETE TABLENAME or even DROP
TABLENAME.
HTH.
--jkl
-
[freetds] readonly access with freetds and php,
Joseph Harth, 12/22/2006
- Re: [freetds] readonly access with freetds and php, James K. Lowden, 12/22/2006
- <Possible follow-up(s)>
- Re: [freetds] readonly access with freetds and php, ZIGLIO, Frediano, VF-IT, 12/22/2006
Archive powered by MHonArc 2.6.24.