EXEC fails on tar command

Post Reply
mjacobson
Posts: 204
Joined: Fri Feb 08, 2002 3:35 pm

EXEC fails on tar command

Post by mjacobson »

Hi,

I am getting ' <EXEC> command /bin/tar returned exit code 2' error on the following line of code.

<EXEC /bin/tar xfp $TarFile -C $datadir></EXEC>

When I run this command as the system user from the command line, I get no error messages and $TarFile is output to $datadir.

Any suggestions?
mjacobson
Posts: 204
Joined: Fri Feb 08, 2002 3:35 pm

EXEC fails on tar command

Post by mjacobson »

For the record, I am on Commercial Version 5.01.1151518054 20060628 and I am not going to be able to upgrade to a newer version of Vortex because it was removed from my budget.
User avatar
Kai
Site Admin
Posts: 1271
Joined: Tue Apr 25, 2000 1:27 pm

EXEC fails on tar command

Post by Kai »

Are you running this via a web server when running the Vortex script? Is the effective user the same as when run from the command line (i.e. is your web server's CGI user the same as the setuid owner of texis/monitor)? Perhaps the CGI environment is running in a chroot environment that does not permit cd'ing to that directory.

Try printing $ret.err and $ret.stderr after the <exec>, for potentially more info about the failure.
mjacobson
Posts: 204
Joined: Fri Feb 08, 2002 3:35 pm

EXEC fails on tar command

Post by mjacobson »

No, This is a script that I run from a crontab to import files into a Vortex database. The user is the same as the Apache web server that provides the web frontend to the application.

I added these two debug statements and now I don't see the error message above and everything is getting imported. Will continue to monitor and have these output to a log file so I can see what is being reported if it happens again.
Post Reply