LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell This Forum is for the discussion of Suse Linux.

Notices



Reply
 
Search this Thread
Old 07-08-2005, 03:53 AM   #16
sugna
LQ Newbie
 
Registered: Jul 2005
Location: Brisbane, Australia
Distribution: Mepis
Posts: 13

Rep: Reputation: 0

I probably shoud be clearer. The apparent difference that I am asking about between MSDOS and Linux is that in MSDOS, you can execute a command that is not in the path simply by typing the command name, so long as that command (an exe file, say) resides in the current directory.

For example, if apache (or any program) for windows or dos was installed in C:\Apache\ and the file to run it was "apache.exe" (I have no idea what it is in reality, but that doesn't matter here), I could run that program simply by typing "apache" from the prompt at C:\Apache, regardless of whether that directory was in the path.

From my little experience with installing apache in Linux described above, it seems that this does not hold true for Linux. In other words, even if the executable file is in the current directory, I still have to specify "./" first if I want to run it.

Am I correct?
 
Old 07-08-2005, 10:37 AM   #17
Brian Knoblauch
Member
 
Registered: Jan 2005
Distribution: SuSE (x86), NetBSD (Sparc), Solaris (Sparc & 32-bit x86)
Posts: 278

Rep: Reputation: 30
Yes/no. Current directory is normally included in the user paths. However, for security purposes, it is NOT when logged in as root. You can easily configure it to have the current directory in the path, but it would not be recommended.
 
Old 07-08-2005, 09:39 PM   #18
sugna
LQ Newbie
 
Registered: Jul 2005
Location: Brisbane, Australia
Distribution: Mepis
Posts: 13

Rep: Reputation: 0
Hmm, interesting. Sorry if I'm a bit slow, but what specifically are the 'security purposes' that you refer to?
 
Old 07-08-2005, 10:59 PM   #19
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Quote:
Originally posted by sugna
Hmm, interesting. Sorry if I'm a bit slow, but what specifically are the 'security purposes' that you refer to?
AFAIK, having the current directory in your $PATH makes it quite possible to accidentaly execute a file located in your current directory... like, for example: i send you a tarball with 5 files... file #4 is an "evil executable" of your choice and it's called "ls"... so after untaring the file you cd to the untared directory and to see the files you type "ls" and and hit enter, which executes the evil executable...
 
  


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Troubleshooting Slow Transfer Speed Between Linux Box and Windows Box timswim78 Linux - General 1 10-23-2005 12:45 PM
Using WinXP to remotely control Linux box RDP? VNC? Fisslefink Linux - Networking 4 03-14-2005 01:38 AM
vnc to linux box from windows N_A_J_M Linux - General 6 10-04-2004 12:36 AM
How do i Run vnc on my linux box? hornet74 Linux - Networking 4 11-14-2003 05:52 PM
Sending CTRL-ALT-DEL to a Windows 2000 box using VNC from Linux scottpioso Linux - Newbie 1 03-04-2003 04:27 PM


All times are GMT -5. The time now is 10:18 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration