SQL grant privileges problem
Posted in 1994
Hi,
I wanted to revoke certain privileges on a table from a few persons,
but in general allow "public" all privileges. (By Informix's default,
on a NON-ANSI database, public is granted all privs).
I ran the following:
revoke all on some_table from bobo;
grant select on some_table to bobo;
The entry in the systabauth table for some_table shows:
grantor grantee tabid tabauth
dbadmin bobo 1442 s------
dbadmin public 1442 su-id--
The Informix SQL Reference Manual on GRANT states that "The most restrictive
privileges always take precedence. For example, if you grant RESOURCE
privileges to a user but do not grant INDEX privileges at the table level,
that user is unable to create indexes for that table."
However, bobo can still do anything! I guess since "public" is a keyword
for all users it doesn't matter what other records are in systabauth for
the table in question? If I revoke "all" from bobo, and grant him zip,
his record is just deleted from systabauth, and he can still do "all".
So, is there no way to grant certain privileges to certain users without
having to grant privileges to each and every individual?
Shouldn't Informix mention that on non-ansi databases you must
"revoke all from public"
before any other privilege you grant or revoke is looked at?
--
Colin McGrath Internet: colin@scdipc0.ueci.com
Raytheon Engineers & Constructors Inc. UUCP: ..!uunet!trac2000!trac3000!cmm
30 S. 17th St Voice: 215-422-3449
Philadelphia, PA, 19101 FAX: 215-422-4095
<Standard disclaimers apply>