need someone familiar with shell

Discussion in 'Site & Server Administration' started by iBold, Mar 23, 2006.

  1. #1
    Ok, this is my first time using shell to hopefully fix my helpdesk (it won't let me overwrite files via FTP). The helpdesk support told me to do the following:
    Ok. So I grant shell access to the user I want to get in there (we'll say pat1121 for the example here). I login to cpanel, and click on the shell link and a command prompt is brought up. I open up an FTP program and copy the file 'auracleprep' to the /home/pat1121 fold. I then try to issue the comman 'cp /home/pat1121/auracleprep /pat1121/local/bin'
    It tells me that the file /pat1121/local/bin doesn't exist?
    So I try to run it from where it is, because that appears to be the folder I am sitting in when I start up the shell program. So I issue:
    auracleprep pat1121 public_html

    and it returns this:
    jailshell: auracleprep: command not found


    Any idea's how to get this to work properly? I'm a complete newb when it comes to linux anything..
     
    iBold, Mar 23, 2006 IP
  2. cyanide

    cyanide Peon

    Messages:
    483
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Most likely the issue is you not specifying the full path
    Try this
    cp /home/pat1121/auracleprep /home/pat1121/local/bin/auracleprep
    Code (markup):
     
    cyanide, Mar 23, 2006 IP
  3. iBold

    iBold Peon

    Messages:
    1,055
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Ok I gave that a go and recieved this:
     
    iBold, Mar 23, 2006 IP
  4. cyanide

    cyanide Peon

    Messages:
    483
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Try this one
     
    cyanide, Mar 23, 2006 IP
  5. iBold

    iBold Peon

    Messages:
    1,055
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Same thing, only its '/home/pat1121/local/bin/' that doesn't exist now :(
     
    iBold, Mar 23, 2006 IP
  6. forkqueue

    forkqueue Guest

    Messages:
    401
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #6
    In unix the current directory isn't in the path for security reasons (someone could hijack common commands this way).

    Just execute the script prepending ./ (the name of the current directory):

    ./auracleprep pat1121 public_html

    Hey presto.
     
    forkqueue, Mar 23, 2006 IP
  7. cyanide

    cyanide Peon

    Messages:
    483
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I guess those 2 folders don't exist ?
     
    cyanide, Mar 23, 2006 IP
  8. iBold

    iBold Peon

    Messages:
    1,055
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #8

    Ok, I tried doing just that and got back:
    -jailshell: ./auracleprep: Permission denied
     
    iBold, Mar 23, 2006 IP
  9. Mystique

    Mystique Well-Known Member

    Messages:
    2,579
    Likes Received:
    94
    Best Answers:
    2
    Trophy Points:
    195
    #9
    Usually you need to use the root user name password to perform such action.

    Aditionally, you need to make sure the scripts are already installed.
    Some OS, like Debian, are installed without many stuff that can be updated running the command #apt-get update before any other.

    Though update procedure depends on your servers operating system if other than Debian.
     
    Mystique, Mar 24, 2006 IP
  10. iBold

    iBold Peon

    Messages:
    1,055
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #10
    This is probobly a good list of reasons why I shouldn't be playing around in these things. I haven't a clue what is going on.
    Where do you guys 'start' when learning about this stuff? I really need to do some reading before I break something.
     
    iBold, Mar 24, 2006 IP