[95964] in RedHat Linux List

home help back first fref pref prev next nref lref last post

Re: Newbie question.

daemon@ATHENA.MIT.EDU (Thomas Ribbrock \(Design/DEG\))
Thu Oct 22 14:15:14 1998

Date: Thu, 22 Oct 1998 19:14:19 +0100
From: "Thomas Ribbrock \(Design/DEG\)" <argathin@iname.com>
To: "'redhat-list@redhat.com'" <redhat-list@redhat.com>
Mail-Followup-To: "'redhat-list@redhat.com'" <redhat-list@redhat.com>
In-Reply-To: <Pine.LNX.3.96.981022203726.5274A-100000@liposome.genebee.msu.su>; from timsoftware@liposome.genebee.msu.su on Thu, Oct 22, 1998 at 08:42:29PM +0400
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com

timsoftware@liposome.genebee.msu.su writes:
> 
[...]
> Linux is configured not to run programms in the current directory. It is
> the part of its security system.

To avoid confusion amongst the newbies on this list: It is *not* Linux 
(what is "Linux", anyway? The Kernel? The whole system?) which
is configured to prevent running programs from the current directory. That
is solely determined by the setting of your path/PATH shell environment
variable. If that search path contains "." (dot = symbol for the current
directory), it is indeed possible to execute progrmas from the current
directory. Most default setups do not have the "." in the search path, and
this is indeed for security reasons: Supposed, you have a malevolent user on
your machine, he could place an executable with the same name as a system
utility (e.g. "ls" or "rm" or something like that) somewhere and just wait
for somebody with "." in the path to change to that directory and try to
execute said system command. In that case, the bogus executable would be
executed instead - and who knows what it does... Therefore, it is good
practice not to have "." as part of the search path, especially not for
root. As a compromise for ordinary users, it is still reasonably safe to
have "." as the *last* entry of the search path - in that case, it's not
possible to replace a system command by an executable in the current
directory, as the system directories will be searched first.

HTH,

Thomas
-- 
                    "Look, ma, no obsolete quotes!"

     Thomas Ribbrock | http://www.bigfoot.com/~kaytan | ICQ#: 15839919
   "You have to live on the edge of reality - to make your dreams come true!"


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
		http://www.redhat.com http://archive.redhat.com
         To unsubscribe: mail redhat-list-request@redhat.com with 
                       "unsubscribe" as the Subject.


home help back first fref pref prev next nref lref last post