Wednesday, January 7, 2009

Advantages of using Absolute paths


Better way to use a command,whether to give absolute path or just command.
For example: Is it better to use /usr/bin/ls or ls

1)Using absolute path is advisable for "root" userid because that will provide:
security :using a full path adds security, then your system is insecure to begin with. Using a full path will do little if anything to improve it.

2)if somebody creates dummy "ls" command in your home directory and you add
your home > in PATH, then when you enter "ls" , "dummy ls" will be executed

anyways in some cases it is necessary to use absolute paths. For example, cron table entries require full paths to the commands because the cron daemon doesn't maintain a PATH variable.

0 comments:

Hit Counter


Statistics

Followers

 

Programmer's Guide. Copyright 2008 All Rights Reserved