Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Re: perl and linux

by {NULE} (Hermit)
on Oct 27, 2003 at 15:05 UTC ( [id://302404]=note: print w/replies, xml ) Need Help??


in reply to Re: perl and linux
in thread perl and linux

Typically ./ is excluded from the path for security reasons. Probably not a big deal in this case (there are more single user, a.k.a. desktop, machines running linux these days than multi-user servers per se). But say on a multi-user machine, some mischevious user creates a bash script called "ls" and puts it in some group writable directory that you do much work in. According to your PATH that ls would be called before the real ls and it would do whatever that mischevious person created it to do. For example, mail your ssl private key to themselves, or /etc/shadow if you foolishly have ./ in your path as root. Of course, their script would then call the real ls then delete itself and you would be none the wiser.

Anyway, I'm not picking on your advice, I would just like people to be aware that ./ is excluded from the path for a very good reason. If you just get used to typing ./program.pl now, you might save yourself problems in the future.

Replies are listed 'Best First'.
Re: Re: Re: perl and linux
by kutsu (Priest) on Oct 27, 2003 at 17:23 UTC

    Okay all you people are right, I forgot he said it was networked. Okay forgot isn't the right word, I have been setting up Linux machines for the past few weeks, all single user or small group of user machines, so I just put the steps I used to make my scripts work.

    Don't use ./ in the path and use 0755 so others can use your scripts, if you want them to (but remember root can see all ;)

    "Pain is weakness leaving the body, I find myself in pain everyday" -me

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://302404]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (7)
As of 2024-03-28 19:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found