Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #184941

Re: Why debian put ~/bin beginning of $PATH

From "Gian Uberto Lauri" <saint@eng.it>
Newsgroups linux.debian.user
Subject Re: Why debian put ~/bin beginning of $PATH
Date 2017-08-09 18:20 +0200
Message-ID <ucBS9-1ep-5@gated-at.bofh.it> (permalink)
References <ucicO-4h6-17@gated-at.bofh.it> <uciZb-5aW-1@gated-at.bofh.it> <ucjLA-5ty-21@gated-at.bofh.it> <ucBS9-1ep-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


>>>>> "慕冬" == 慕 冬亮 <mudongliangabcd@hotmail.com> writes:

慕冬> User's command is usually stored in "/usr/local/bin". It should
慕冬> be placed before "/bin" in the $PATH.

/usr/local is a directory hierarchy for binaries typical of the local
installation and being, by default, owned by root, it is not a
directory for user commands.

Having ~/bin before /bin and /usr/bin (and /usr/local/bin) is of no
harm at all if your account is safe enough.

If and only if someone can log on with your account, she can put a
malicious copy/wrapper of a system command (ls to name one) in your
bin and you could trigger it thinking to use the system version.

What *is* dangerous is having . before system directories, especially
on multi-user machines.

In this scenario, user A, who has . in the path before /bin, goes in a
directory of user B and does an 'ls'.

That directory contains an executable called ls that is smart enough
to hide itself. But bastard enough to do something nasty, a Trojan
horse. And user A just brought it within the walls...

-- 
 /\           ___                                    Ubuntu: ancient
/___/\_|_|\_|__|___Gian Uberto Lauri_____               African word
  //--\| | \|  |   Integralista GNUslamico            meaning "I can
\/                 coltivatore diretto di software       not install
     già sistemista a tempo (altrui) perso...                Debian"

Warning: gnome-config-daemon considered more dangerous than GOTO

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Why debian put ~/bin beginning of $PATH spp mg <sm.sppmg@gmail.com> - 2017-08-08 21:20 +0200
  Re: Why debian put ~/bin beginning of $PATH Nicolas George <george@nsup.org> - 2017-08-08 21:40 +0200
  Re: Why debian put ~/bin beginning of $PATH John Elliot V <jj5@jj5.net> - 2017-08-08 21:40 +0200
  Re: Why debian put ~/bin beginning of $PATH Michael Lange <klappnase@freenet.de> - 2017-08-08 22:10 +0200
    Re: Why debian put ~/bin beginning of $PATH spp mg <sm.sppmg@gmail.com> - 2017-08-08 23:00 +0200
      Re: Why debian put ~/bin beginning of $PATH Michael Lange <klappnase@freenet.de> - 2017-08-08 23:30 +0200
      Re: Why debian put ~/bin beginning of $PATH Teemu Likonen <tlikonen@iki.fi> - 2017-08-09 06:50 +0200
        Re: Why debian put ~/bin beginning of $PATH Teemu Likonen <tlikonen@iki.fi> - 2017-08-09 07:00 +0200
      Re: Why debian put ~/bin beginning of $PATH "Gian Uberto Lauri" <saint@eng.it> - 2017-08-09 18:20 +0200
        Re: Why debian put ~/bin beginning of $PATH David Wright <deblis@lionunicorn.co.uk> - 2017-08-09 19:00 +0200
    Re: Why debian put ~/bin beginning of $PATH Greg Wooledge <wooledg@eeg.ccf.org> - 2017-08-09 15:20 +0200
  Re: Why debian put ~/bin beginning of $PATH soyeomul@doraji.xyz (Byung-Hee HWANG (황병희, 黃炳熙)) - 2017-08-11 16:00 +0200
  Re: Why debian put ~/bin beginning of $PATH Vincent Lefevre <vincent@vinc17.net> - 2017-08-14 15:30 +0200

csiph-web