httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michelle Brownsworth <>
Subject Re: [users@httpd] Bourne shell CGI script filename expansion
Date Tue, 11 Mar 2003 17:47:10 GMT
>Hi Michelle,
>On Mon, Mar 10, 2003 at 11:13:29PM -0800, Michelle Brownsworth wrote:
>>  Apache seems to prevent globbing for filename expansion when
>>  executing a Bourne shell script as CGI:
>>  for sendlog in *
>>       do
>>           echo $sendlog >> /tmp/diag.txt
>>       done
>I'd assume this is a consequence of the shell running without a controlling
>terminal.  Apache doesn't know anything about the particulars of any given
>script interpreter, and I don't believe it could be responsible for this
>Another way of writing that code would be
>for sendlog in `ls *`
>which should work just fine.


Thanks for the reply.  I tried your suggestion, which makes a great 
deal of logical sense, but it doesn't seem to solve the problem. 
Here's the result:

su-2.05b# more /tmp/diag.txt

No file list and no "*" char.  I agree with your analysis of the 
problem and your contention that Apache doesn't play a part in it.  I 
created a crontab to invoke the script as user nobody, and got the 
same results.

So it's looking like I should post my question in a Bourne shell 
support list, if I can find one.

Appreciate the help.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message