change login

Hi,
I have a script called from php, which executes the following code:

basename $arxivo .doc > nombre
nom=`cat nombre`
antiword -t $arxivo > $nom.txt
rm nombre    

The problem is that I do not antiword conversion. I guess the problem must be that the user does not have permissions www-data (the Apache) to run such commands.
I can do?

Thank you very much

what does the antiword do? reverse?

you can tell your actual requirement, may be we can come up with the another solution without using antiword .

First, you again win an Useless Use Of Cat Award, because that could have been written just as easy as

antiword -t $arxivo > $( basename ${arxivo} .doc).txt

3 lines less, and no temporary file with a race condition to worry about.

Second, CGI scripts usually run in a very minimalistic environment. Try referencing the antiword command by it's full path, make sure the directory you're in is writeable by www-data, and that the original file can be read by www-data.