Re: In need of a SHELL Script - Please!!!

From: Ed Morton (mortonAVOIDINGSPAM_at_Lucent.com)
Date: 10/24/03


Date: Fri, 24 Oct 2003 16:53:31 -0500


On 10/24/2003 4:34 PM, Kevin Rodgers wrote:
> Ed Morton wrote:
>
>
>>On 10/24/2003 11:29 AM, rbristol wrote:
>>
>>>KSH. Am I not running the script properly...I'm in the directory where
>>>both the files and the script live and at the command prompt I type
>>>
>>>'. scriptname'
>>
>>Make sure sriptname is executable and replace ". " with "./" (i.e. ./scriptname
>>with no spaces). If that doesn't fix it post EXACTLY the script you're using
>>because the one from your previous posting:
>
>
> A shell script file executed with . (vs. run as a command) does not need
> to be executable. In fact, if the commands in the file must be executed
> with . in order to effect the current shell's environment, you should
> not make the file executable so that if someone tries to run it as a
> command, it will fail.
>

Absolutely correct but none of that applies to this particular script. The OP is
just trying to move a bunch of files, not affect the environment. I suspect
(s)he just doesn't know how to make the script executable and/or how to execute
it if the current directory isn't in his/her PATH.

        Ed.



Relevant Pages

  • [UNIX] Vulnerabilities Found in Scponly
    ... SSHd environment files. ... the user can upload a file with a custom ... This provides the user with a means of running arbitrary commands ... the user could execute arbitrary commands by uploading ...
    (Securiteam)
  • Re: head, recursively through file tree?
    ... What's the problem with running a shell or perl inline script ... | child-process to execute the user's commands. ... the shell forks a process for every command it runs unless ...
    (comp.unix.shell)
  • Re: Maby a litle OT but: apache+sh CGI script
    ... that the http user is added to sudoers and may execute only ... thouse commands that it realy needs for the script. ... it's safer then giving apache full root priv. ...
    (comp.os.linux.security)
  • Re: Maby a litle OT but: apache+sh CGI script
    ... that the http user is added to sudoers and may execute only ... thouse commands that it realy needs for the script. ... it's safer then giving apache full root priv. ...
    (comp.os.linux.security)
  • Re: Will Linux become as vulnerable as MS ??
    ... > beeing vulnerable to viruses. ... > that they know are executable, and execute intentionally. ... >> Linux, each distro is a little different, and even within the distro, ... > Since clicking on a script is easier than typing it's name, ...
    (comp.os.linux.security)