Urgent: how to deny read access to a ExecCGI directory

Posted by Malvolio on Server Fault See other posts from Server Fault or by Malvolio
Published on 2011-02-07T19:49:39Z Indexed on 2011/02/07 23:27 UTC
Read the original article Hit count: 157

Filed under:

First, I can't believe that that isn't the default behavior. Second, yikes! I don't know how long my code's been hanging out there, with all sort of cool secret stuff, just waiting for some hacker who knows Apache better than I do.

EDIT (and apology)

Well, this is sort of embarrassing. Here's what happened:

We had some Python scripts available to the web, at /aux/file.py, which were not surprisingly at /var/www/http/aux . Separately, we were running an app server and Apache proxies through at /servlets/. A contractor had constructed the WAR file by bundling up all the generated files including the Python files (which are in a directory also called aux, not surprisingly), so if you typed in /servlets/aux/file.py, the web-server would ask the app-server for it and the app-server would just supply the file. It was the latter URL that this morning I happened to type in by accident and lo, the source appeared.

Until I realized the shear unlikelihood of what I had done, the situation was rating about 8.3 on the sphincter scale. After a tense half-hour or so I realized that it had nothing to do with the CGI (and that serving files that were also executable would be not only foolish but also impossible), and was able to address the real problems.

So -- sorry, everybody. Let the scorn-fest commence.

© Server Fault or respective owner

Related posts about apache