LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-25-2003, 06:11 PM   #31
t1mc00per
Member
 
Registered: Jan 2003
Location: Midlands, England
Distribution: Mandrake 9.0, Slackware 8.1
Posts: 76

Original Poster
Rep: Reputation: 15

"Piss on it"? That's a nice expression. I might try to include that in my expletive vocab!

A linux question now - if anyone's still reading this post - I understand that a list of executable files is stored in a PATH environment variable. Very useful I thought, but what if it gets lost/deleted? Can this happen and what if it does?
 
Old 01-25-2003, 06:28 PM   #32
Bert
Senior Member
 
Registered: Jul 2001
Location: 406292E 290755N
Distribution: GNU/Linux Slackware 8.1, Redhat 8.0, LFS 4.0
Posts: 1,004

Rep: Reputation: 46
It's best to start a new thread if you have a new question, because more people who are likely to be able to answer it will see it.

I know the answer to this one so it's OK here.

You can execute any file if you change it's permissions to 0777 and use dotslash:

chmod 0777 myprog &&
./myprog

will execute it. However, if the directory is included in the PATH variable, it can be executed simple by typing it at the command line:

myprog

There's a bit more to it though, as the PATH variable store lists of directories, not files. You have to think about PATH variables from a security point of view, because say if some ne'erdogood were to write a nasty program called bash and put it in your home directory, if the home directory was listed before the /bin directory inb the PATH variable, then when you type 'bash', his program would execute, not the bash shell as you expected.

I think the tutorial BASH Progamming in the links section on this site mentions this (it should anyway)

Bert

Last edited by Bert; 01-25-2003 at 06:29 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
probs with vector linux 5.0 ankscorek Linux - Hardware 5 08-07-2005 06:58 PM
Linux Gateway Probs Randvegeta Linux - Networking 4 04-26-2005 08:33 AM
Did a linux update and now have probs bmicielli Linux - Software 3 08-23-2003 05:45 PM
Probs uninstalling linux busybee Linux - Newbie 4 10-28-2002 11:48 AM
Linux partitioning probs... Glockage Linux - General 4 02-02-2002 09:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration