[Novalug] Sample shell code...

donjr djr1952 at hotpop.com
Fri Feb 23 17:41:56 EST 2007


On Fri, 2007-02-23 at 15:56 -0500, Joel Fouse wrote:
> On Fri, 2007-02-23 at 15:09 -0500, donjr wrote:
> > Having an executable in a directory that you also have WRITE permission
> > to is dangerous as it means the executable can also accidently be
> > changed or deleted.
> 
> Beg pardon?  Since shell scripts were what started this tangent, how are
> you supposed to write a script if you don't have write permission in the
> directory you want to put it?  I'm sure your statement makes sense in a
> certain context, but seems overbroad as stated.  Care to clarify?
> 
> - Joel

A system that is currently being (re)programmed ie having new programs
added and/or modified, even something as simple as a shell script, is
always in a dangerous and/or unpredictable state. No matter what
precautions you might take.

Besides the above see any of the following:

 "Why putting ~/bin or . in your $PATH is a bad idea"
<http://www.everything2.com/index.pl?node_id=1362450>

 "from an older Debian mailing list"
 <http://lists.debian.org/debian-user/2002/09/msg04694.html>

 "12. Security concerns"
 <http://www.faqs.org/docs/Linux-mini/Path.html#s12>

 "Why it can possible be a very bad idea to execute 'man man' as root"
 <http://xforce.iss.net/xforce/alerts/id/advise63>


--  
-- 
 Don E. Groves, Jr. 

$ /usr/games/fortune : 
If one cannot enjoy reading a book over and over again, there is no use
in reading it at all.  -- Oscar Wilde



More information about the Novalug mailing list