LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 07-08-2005, 02: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, 09:37 AM   #17
Brian Knoblauch
Member
 
Registered: Jan 2005
Distribution: OpenSuse Tumbleweed
Posts: 288

Rep: Reputation: 39
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, 08: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, 09:59 PM   #19
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
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



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 11:45 AM
Using WinXP to remotely control Linux box RDP? VNC? Fisslefink Linux - Networking 4 03-14-2005 12:38 AM
vnc to linux box from windows N_A_J_M Linux - General 6 10-03-2004 11:36 PM
How do i Run vnc on my linux box? hornet74 Linux - Networking 4 11-14-2003 04:52 PM
Sending CTRL-ALT-DEL to a Windows 2000 box using VNC from Linux scottpioso Linux - Newbie 1 03-04-2003 03:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 06:37 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