Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Suppose the uri of that executable is known:http://domain.name/exe_uri

Will it be executed if we just type it in the address bar?

share|improve this question
add comment

2 Answers

The answer is "it depends." If your executable is within the web root and has been configured to run as a CGI and has the correct permissions set, then yes, it will run.

If you just have some random file located within your web space, chances are it will just prompt for download. Your web server will treat it as it would any other blob of data on disk.

More specifically, what are you trying to accomplish? Perhaps the answer can be narrowed a bit depending on what you actually want to do.

share|improve this answer
add comment

No, that'll just serve the file for you to download.

You need to use a shell to execute the file, or some server side scripting. For example, in Perl/PHP:

./thebinaryfileyouwanttoexecute;

is sufficient.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.