Hi,

the question here is, with which userid is the system command
executed?
There have been changes in behaviour regarding this question,
and to be honest in the "not-so-new" version of IDS that you
have in use ... I do not know, how it is behaving, i.e. with which
userid a system command is executed.

You can try to run a command like "id -a > /tmp/here_am_i"
via the system command. Then run the procedure and
afterwards look at the file "/tmp/here_am_i" and check it's
content - it should tell the userid at runtime of the command.
This should then help you to understand why you get the
error and also to understand what you have to do to avoid it.

Regards,
Martin
--
Martin Fuerderer
IBM Informix Development Munich, Germany
Information Management

IBM Deutschland GmbH
Chairman of the Supervisory Board: Hans Ulrich Märki
Board of Management: Martin Jetter (Chairman), Rudolf Bauer, Christian
Diedrich, Christoph Grandpierre, Matthias Hartmann, Thomas Fell, Michael
Diemer
Corporate Seat: Stuttgart, Germany; Reg.-Gericht: Amtsgericht Stuttgart,
HRB-Nr.: 14 562 WEEE-Reg.-Nr. DE 99369940


informix-list-bounces@iiug.org wrote on 25.10.2007 15:46:03:

> Hi All
>
> We are using HP- UX B.11.00 U 9000/800 and Informix Dynamic Server
> 2000 Version 9.21.UC2
> I was trying to run a SYSTEM command inside a procedure and its called
> in a trigger and the procedure runs but crashes where the SYSTEM
> command is with the following error
>
> system "mailx -s '" || v_subject || "' " || v_spvalue || " > v_filename || "' ";
>
>
> EFACS X-Pro ERROR : update salesitems file
> -668 syntax command cannot be
> executed.
> -1 Not owner
>
>
> and the error described as follows
>
>
> -668 System command cannot be executed.
>
> A system call failed in the operating system. The following example
> shows a statement that might cause an error:
>
> SYSTEM 'hello';
>
> Make sure that the system command is not trying to run something that
> is
> not in your path or that is not applicable to the environment.
>
> Make sure that you have provided a user-id and password when
> connecting
> to the database server. The database server must have the user's
> password
> in order to execute a command on behalf of that user.
>
> On Windows NT platforms, make sure the following Advanced User Rights
> have
> been assigned to user "informix": Act as part of the operating system;
> Increase quotas; replace a process level token.
>
> -1 Not owner.
>
> An operating-system error code with the meaning shown was unexpectedly
> returned to the database server. Check the ownership and permissions
> of
> files and directories that are used in the current operation. Look for
> other operating-system error messages that might give more
> information.
>
>
>
> Checked the permissions in the file /directory and its fine . Also
> when I logged in as informix the procedure runs without any problem.
>
> Hope you can help Me
>
>
> Regards
> Sharm
>
> _______________________________________________
> Informix-list mailing list
> Informix-list@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list