ECN No Name Newsletter: May, 1990

The ECN No Name Newsletter is no longer being published. This is an archived issue.

[next article]

Changes To The Default Path

Philip R. Moyer

On Monday, May 28th, ".", which stands for the current directory, will be moved to the end of the default path. It is currently at the front of the default path. This change is being made to enhance security for individuals, as well as to enhance system security.

After this change is made, commands found in standard locations will be executed before commands with the same name found in the current directory. For example, with "." at the front of the path, a user program named "test" can be executed by typing "test" in the same directory as the program. With "." at the end of the default path, however, merely typing "test", even though the user is in the same directory as the "test" program, will execute /bin/test or /usr/bin/test (depending on the architecture of the host machine), rather than the "test" in the current directory.

If users want to run programs that have the same name as system commands, they will need to use a specific path name. To continue the above example, the user who wishes to use the "test" program in the current directory, rather than /bin/test (or /usr/bin/test), simply needs to type "./test" . Users who explicitly modify the default path to set the position of "." in their path in their .login, .profile or .cshrc files will need to modify those files to reflect the change in the default path.

Some shell scripts may be effected by this path change. If shell scripts exhibit odd behavior after May 28th, check to see that they are using the intended commands. The which command (/usr/ucb/which) will tell users which version of a command they are using. Just type "which " and which will return the full path to the program that will be executed. Type "man which" for more information. Remember, good shell programmers will always use a specific command or set the PATH variable explicitly, rather than allowing the PATH variable in the environment to determine the command used.


webmaster@ecn.purdue.edu
Last modified: Thursday, 30-Oct-97 18:13:25 EST

[HTML Check] HTML