Re: GRANT SELECT in Informix on RedHat 6.2
Posted in 2000
--- Paul King <pking@idirect.com>
> wrote:
>This is related to an earlier post regarding the delivery of tabled
>data to a web page using a CGI script.
>
>However, the user 'nobody" owns the process that is running the
>script. And to put a GRANT CONNECT ... and a GRANT SELECT ...
>statement inside the CGI script is counter-intuitive, since that winds
>up with user 'nobody' (the owner of the web server process) granting
>access to himself, when he doesn't own the database. It doesn't make
>sense. But more to the point, it doesn't work either.
>
>So I did a GRANT CONNECT to 'nobody', as in:
> GRANT CONNECT TO 'nobody'>under the "STARTI dbaccess" text interface.
>
>Notice I didn't specify a table. dbaccess reported a syntax error when
>I tried. Informix had no problem with the above syntax, though.
>
>Another statement I wrote was to grant select privelages to 'nobody',
>as in:
> GRANT SELECT ON names TO 'nobody'
>And the table "names" does exist in the database I opened.>
>Informix had big problems with that. In my text editor (which dbaccess
>spawned after the error), the problem it pointed to was the keyword
>"GRANT". Aaaarghhh!!!
The "GRANT". Aaaarghhh!!! syntax is scheduled for a future release.
What was before your grant statement? When your editor points to something legit the problem usually exists prior. For example, the AND keyword is a perfectly fine thing to use in a where statement (unless you haven't written the where part).
SELECT count(*)
FROM table
AND field = 'value'
This will point to the AND as the culprit (If I remember correctly).
==
Maintainer of the procrastinator's FAQ. Well, maybe tomorrow I will be.
_____________________________________________________________
Want a new web-based email account ? ---> http://www.firstlinux.net