[wplug] Setting PATH

Robert Dale rdale at wplug.org
Fri Jan 19 14:40:33 EST 2001


You can make the order what you want.

PATH=/bin:/usr/bin
export PATH=$PATH:/my/local/binaries

If you type 'ls', it will check /bin first, then /usr/bin, and finally
'/my/local/binaries'.

Security warnings are just that - warnings.  Yes, of course you should be
aware of potential pitfalls so you can avoid them.  If you follow common
advice, you should be OK.  Some simple ones are:

- put system PATHs first
- put your own binaries in a bin/ directory, probably ~/bin/
- never put '.' in your PATH

On Fri, 19 Jan 2001, Luquilla Hughes wrote:

> Yes from what I have read those would both work but for everything I have 
> read it always comes with a huge security warning not to do that.
> 
> If you are a single user system it may not be so critical, however if you 
> change your path enviroment then you change what programs get run.
> So for example you have a Bash script that presents the processes in color 
> called ps in your current dir. By placing the current dirrectory before /bin 
> or /sbin it will run that instead of the system ps.
> The security concern comes in when a file gets placed into you current 
> directory, like a simple shell script named ls, and it consists of "rm -r 
> ~/*" which you don't want but it was the first ls found in your path.
> hope that makes sense and helps. if not maybe somebody will clarify.
> 
> 
> >From: Robert Dale <rdale at wplug.org>
> >Reply-To: wplug at wplug.org
> >To: "'wplug at wplug.org'" <wplug at wplug.org>
> >Subject: Re: [wplug] Setting PATH
> >Date: Fri, 19 Jan 2001 09:15:25 -0500 (EST)
> >
> >On Fri, 19 Jan 2001, Weber, Larry A wrote:
> >
> > > I am using Caldera's eDesktop 2.4 and the bash shell.  Is there a file I 
> >can
> > > change so that I can permanently set my search path to include the 
> >current
> > > directory?
> >
> >~/.bashrc
> >
> >--
> >Robert Dale
> >
> >		Vive le wplug!
> >
> >
> >
> >_______________________________________________
> >wplug mailing list
> >wplug at wplug.org
> >http://www.wplug.org/mailman/listinfo/wplug
> 
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com
> 
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug
> 

-- 
Robert Dale

		Vive le wplug!






More information about the wplug mailing list