$HOME/bin

Fabian Deutsch fabian.deutsch at gmx.de
Mon Jul 13 12:15:12 UTC 2009


Hey,

Am Montag, den 13.07.2009, 14:08 +0200 schrieb Ondřej Vašík:
> Stefan Assmann wrote:
> > Hi all,
> > 
> > I was wondering why there's no $HOME/bin directory and $HOME/bin not
> > mentioned in the $PATH variable. Any particular reason not to have that
> > by default?
> 
> $HOME/bin is not on every system and the other default directories in
> default PATH are(at least on the most of systems ;) ). However, some
> Linux distros do add something as:
> # set PATH so it includes user's private bin if it exists
> if [ -d "$HOME/bin" ] ; then
> PATH="$HOME/bin:$PATH"
> fi

Adding something like this raises security concerns, as this opens doors
for malicious software.
E.g. some application could but a binary named "bash" in ~/bin, which
would be run before /bin/bash.
So, if at all, let's use $PATH:$HOME/PATH

- fabian

> as default - so this dir gets added automatically when does exist.
> I'm generally +1 for changing the default that way - as it would not
> change anything for users without that directory.
> 
> Greetings,
>          Ondřej Vašík
> -- 
> fedora-devel-list mailing list
> fedora-devel-list at redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-devel-list




More information about the fedora-devel-list mailing list