oreilly.comSafari Books Online.Conferences.

Apache FAQ
Linux FAQ

Log in to particpate

   Linux FAQ > 7. Solutions to Common Miscellaneous Problems
Question:  7.24. Why Won't a Program Work in the Current Directory?

Because the current directory (i.e., ".") is not in the search path, for security reasons, as well as to insure that the correct program versions are used. If an intruder is able to write a file to a world-writable directory, like /tmp, presumably he or she would be able to execute it if the directory were in the search path. The solution to this is to include the directory in the command; e.g., "./myprog," instead of "myprog." Or add the current directory to your PATH environment variable; e.g., "export PATH=".:"$PATH" using bash, although this is discouraged for the reasons mentioned above.

This FAQ is from Linux Frequently Asked Questions with Answers, maintained by Robert Kiesling

Sponsored by: