Database permission to run compiled 4GL program
Posted in 2006
Chad ran a C-compiled 4GL 7.32 program against SE 7.25 on Linux and got SQL error -329 / system error -13 (permission denied) at the DATABASE statement unless the user was added to the informix group. dbaccess and isql worked fine for the same user. Suggestions included checking sqlhosts/INFORMIXSERVER, GRANT CONNECT/DBA, directory 770 and .dat/.idx 660 owned by informix:informix, verifying the setuid bits on $INFORMIXDIR/lib/sqlexec, and inspecting line 40 of the source. All checks came back as already correct, and the thread ends with Chad musing about trying r4gl (RDS) instead of c4gl. No resolution is recorded.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Server Administration, Security, Permissions & Auditing, Platform-Specific Issues
I'm running compiled 4GL version 7.32 UC3 on Linux and when I try to
execute a 4ge program I get the following error:
Program stopped at "program.4gl", line number 40.
SQL statement error number -329.
Database not found or no system permission.
SYSTEM error number -13.
Permission denied
If I put the user in group 'informix' so the user has access to the
.dbs directory then the 4ge program runs. If the user isn't a member
of group 'informix' the user can access the database with isql and
dbaccess so permissions are setup properly, why can't the user acess
the database with c4gl? DBPATH is set correct.
How do you connect to the database - your sqlhosts and INFORMIXSERVER
environment variable?
What version of SE do you have?
Have you issues a grant connect, grant resource or grant dba sql to this
database?
What user did you create the database as? The permissions on the directory
should be 770 user Informix and the database files 660 user Informix
except for the system tables (I think) which are owned by Informix.
MW
-----Original Message-----
From: informix-list-bounces@iiug.org [mailto:informix-list-bounces@iiug.org]
On Behalf Of Chad
Sent: Tuesday, 24 October 2006 1:47 p.m.
To: informix-list@iiug.org
Subject: Database permission to run compiled 4GL program
I'm running compiled 4GL version 7.32 UC3 on Linux and when I try to
execute a 4ge program I get the following error:
Program stopped at "program.4gl", line number 40.
SQL statement error number -329.
Database not found or no system permission.
SYSTEM error number -13.
Permission denied
If I put the user in group 'informix' so the user has access to the
.dbs directory then the 4ge program runs. If the user isn't a member
of group 'informix' the user can access the database with isql and
dbaccess so permissions are setup properly, why can't the user acess
the database with c4gl? DBPATH is set correct.
_______________________________________________
Informix-list mailing list
Informix-list@iiug.org
http://www.iiug.org/mailman/listinfo/informix-list
ifxmaillist@quanta.co.nz wrote:
> How do you connect to the database - your sqlhosts and INFORMIXSERVER
> environment variable?
Yes
> What version of SE do you have?
7.25.UC6
> Have you issues a grant connect, grant resource or grant dba sql to this
> database?
grant connect and grant dba
> What user did you create the database as?
Informix
> The permissions on the directory
> should be 770 user Informix and the database files 660 user Informix
> except for the system tables (I think) which are owned by Informix.
That is what i have set
>
> MW
>
> -----Original Message-----
> From: informix-list-bounces@iiug.org [mailto:informix-list-bounces@iiug.org]
> On Behalf Of Chad
> Sent: Tuesday, 24 October 2006 1:47 p.m.
> To: informix-list@iiug.org
> Subject: Database permission to run compiled 4GL program
>
> I'm running compiled 4GL version 7.32 UC3 on Linux and when I try to
> execute a 4ge program I get the following error:
>
> Program stopped at "program.4gl", line number 40.
> SQL statement error number -329.
> Database not found or no system permission.
> SYSTEM error number -13.
> Permission denied
>
> If I put the user in group 'informix' so the user has access to the
> .dbs directory then the 4ge program runs. If the user isn't a member
> of group 'informix' the user can access the database with isql and
> dbaccess so permissions are setup properly, why can't the user acess
> the database with c4gl? DBPATH is set correct.
>
> _______________________________________________
> Informix-list mailing list
> Informix-list@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list
it sounds that you lost the suid bits on $INFORMIXDIR/lib/sqlexec
in $INFORMIXDIR/etc/sefiles (if i recall correctly ) it is listed what
it should be
thin ice:
root informix rwsr-sr-x sqlexec
if this is the case then you may have more problems;
you may need to create a test database and give users the proper
permissions
using grant revoke and run your program against that.
Superboer.
Chad schreef:
> ifxmaillist@quanta.co.nz wrote:
> > How do you connect to the database - your sqlhosts and INFORMIXSERVER
> > environment variable?
>
> Yes
>
> > What version of SE do you have?
>
> 7.25.UC6
>
> > Have you issues a grant connect, grant resource or grant dba sql to this
> > database?
>
> grant connect and grant dba
>
> > What user did you create the database as?
>
> Informix
>
> > The permissions on the directory
> > should be 770 user Informix and the database files 660 user Informix
> > except for the system tables (I think) which are owned by Informix.
>
> That is what i have set
>
> >
> > MW
> >
> > -----Original Message-----
> > From: informix-list-bounces@iiug.org [mailto:informix-list-bounces@iiug.org]
> > On Behalf Of Chad
> > Sent: Tuesday, 24 October 2006 1:47 p.m.
> > To: informix-list@iiug.org
> > Subject: Database permission to run compiled 4GL program
> >
> > I'm running compiled 4GL version 7.32 UC3 on Linux and when I try to
> > execute a 4ge program I get the following error:
> >
> > Program stopped at "program.4gl", line number 40.
> > SQL statement error number -329.
> > Database not found or no system permission.
> > SYSTEM error number -13.
> > Permission denied
> >
> > If I put the user in group 'informix' so the user has access to the
> > .dbs directory then the 4ge program runs. If the user isn't a member
> > of group 'informix' the user can access the database with isql and
> > dbaccess so permissions are setup properly, why can't the user acess
> > the database with c4gl? DBPATH is set correct.
> >
> > _______________________________________________
> > Informix-list mailing list
> > Informix-list@iiug.org
> > http://www.iiug.org/mailman/listinfo/informix-list
Really daft question, but I find that usually locates the problem !!
What does lines 40 of the source say? is it attempting to connect to a
valid database, is it using a variable that hasn't been set ?
Error Message 13 also refers to a REPORT TO function, are you trying
to output a report somewhere where the user does not have write
permission?
Keith
On 23 Oct 2006 17:47:05 -0700, Chad <c320f@yahoo.com> wrote:
> I'm running compiled 4GL version 7.32 UC3 on Linux and when I try to
> execute a 4ge program I get the following error:
>
> Program stopped at "program.4gl", line number 40.
> SQL statement error number -329.
> Database not found or no system permission.
> SYSTEM error number -13.
> Permission denied
>
> If I put the user in group 'informix' so the user has access to the
> .dbs directory then the 4ge program runs. If the user isn't a member
> of group 'informix' the user can access the database with isql and
> dbaccess so permissions are setup properly, why can't the user acess
> the database with c4gl? DBPATH is set correct.
>
> _______________________________________________
> Informix-list mailing list
> Informix-list@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list
>
Check that you've set *group* informix on the directory and .idx/.dat files too... On Tuesday 24 October 2006 03:30, Chad wrote: > > The permissions on the directory > > should be 770 user Informix and the database files 660 user Informix > > except for the system tables (I think) which are owned by Informix. -- Mike Aubury
Superboer wrote:
> it sounds that you lost the suid bits on $INFORMIXDIR/lib/sqlexec
>
> in $INFORMIXDIR/etc/sefiles (if i recall correctly ) it is listed what
> it should be
> thin ice:
>
> root informix rwsr-sr-x sqlexec
>
This is what mine is set to.
> if this is the case then you may have more problems;
> you may need to create a test database and give users the proper
> permissions
> using grant revoke and run your program against that.
>
> Superboer.
>
>
> Chad schreef:
>
> > ifxmaillist@quanta.co.nz wrote:
> > > How do you connect to the database - your sqlhosts and INFORMIXSERVER
> > > environment variable?
> >
> > Yes
> >
> > > What version of SE do you have?
> >
> > 7.25.UC6
> >
> > > Have you issues a grant connect, grant resource or grant dba sql to this
> > > database?
> >
> > grant connect and grant dba
> >
> > > What user did you create the database as?
> >
> > Informix
> >
> > > The permissions on the directory
> > > should be 770 user Informix and the database files 660 user Informix
> > > except for the system tables (I think) which are owned by Informix.
> >
> > That is what i have set
> >
> > >
> > > MW
> > >
> > > -----Original Message-----
> > > From: informix-list-bounces@iiug.org [mailto:informix-list-bounces@iiug.org]
> > > On Behalf Of Chad
> > > Sent: Tuesday, 24 October 2006 1:47 p.m.
> > > To: informix-list@iiug.org
> > > Subject: Database permission to run compiled 4GL program
> > >
> > > I'm running compiled 4GL version 7.32 UC3 on Linux and when I try to
> > > execute a 4ge program I get the following error:
> > >
> > > Program stopped at "program.4gl", line number 40.
> > > SQL statement error number -329.
> > > Database not found or no system permission.
> > > SYSTEM error number -13.
> > > Permission denied
> > >
> > > If I put the user in group 'informix' so the user has access to the
> > > .dbs directory then the 4ge program runs. If the user isn't a member
> > > of group 'informix' the user can access the database with isql and
> > > dbaccess so permissions are setup properly, why can't the user acess
> > > the database with c4gl? DBPATH is set correct.
> > >
> > > _______________________________________________
> > > Informix-list mailing list
> > > Informix-list@iiug.org
> > > http://www.iiug.org/mailman/listinfo/informix-list
Mike Aubury wrote: > Check that you've set *group* informix on the directory and .idx/.dat files > too... > > On Tuesday 24 October 2006 03:30, Chad wrote: > > > The permissions on the directory > > > should be 770 user Informix and the database files 660 user Informix > > > except for the system tables (I think) which are owned by Informix. > > -- > Mike Aubury The directory and .idx/.dat files are set to chown informix:informix.
Keith Simmons wrote:
> Really daft question, but I find that usually locates the problem !!
> What does lines 40 of the source say? is it attempting to connect to a
> valid database, is it using a variable that hasn't been set ?
> Error Message 13 also refers to a REPORT TO function, are you trying
> to output a report somewhere where the user does not have write
> permission?
>
> Keith
Line 40 is the main section
main
options
menu line 2
defer interrupt
Yes the database is valid and if I give the user access the the .dbs
directory, it works. There is no REPORT TO in the program.
>
> On 23 Oct 2006 17:47:05 -0700, Chad <c320f@yahoo.com> wrote:
> > I'm running compiled 4GL version 7.32 UC3 on Linux and when I try to
> > execute a 4ge program I get the following error:
> >
> > Program stopped at "program.4gl", line number 40.
> > SQL statement error number -329.
> > Database not found or no system permission.
> > SYSTEM error number -13.
> > Permission denied
> >
> > If I put the user in group 'informix' so the user has access to the
> > .dbs directory then the 4ge program runs. If the user isn't a member
> > of group 'informix' the user can access the database with isql and
> > dbaccess so permissions are setup properly, why can't the user acess
> > the database with c4gl? DBPATH is set correct.
> >
> > _______________________________________________
> > Informix-list mailing list
> > Informix-list@iiug.org
> > http://www.iiug.org/mailman/listinfo/informix-list
> >
Maybe I should use r4gl(rds) instead of c4gl? Since both isql and
dbaccess work, maybe I would have better luck with r4gl.