httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lee Fellows <lfell...@4lane.com>
Subject Re: [users@httpd] Bourne shell CGI script filename expansion
Date Tue, 11 Mar 2003 18:35:53 GMT
On Tue, 2003-03-11 at 12:47, Michelle Brownsworth wrote:
> >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:
> ><--snip-->
> >>  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
> >behaviour.
> >
> >Another way of writing that code would be
> >
> >for sendlog in `ls *`
> >
> >which should work just fine.
> >
> >Cheers,
> >
> >Zac
> 
> 
> Zac,
> 
> 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
> /var/log/qmail/qmail-send
> 
> 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.

  You state you tried the same thing from a cron job as nobody and
  got the same results as the CGI script generated?

  What are the permissions on the files and the directory path?

  Who owns the files/directories involved?


> 
> So it's looking like I should post my question in a Bourne shell 
> support list, if I can find one.
> 
> Appreciate the help.
> 
> Best,
> .\\ichelle
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
-- 
Lee Fellows <lfellows@4lane.com>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message