Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Script  (Read 3591 times)

0 Members and 1 Guest are viewing this topic.

sya

    Topic Starter


    Greenhorn

    Script
    « on: December 12, 2009, 04:44:52 PM »
    Hi all,

    I am a beginner in this stuff. i always telnet to this one server and then connect to ftp server to do downloading (server-client case). i usually running prepared script saved in ftp client. script is in .sh file (eg: script.sh). my Q is why suddently this error msg saying "permission denied" popped out when i tried to run the script as usual? Please help. thanks so much.

    Anyway, my command line is sumthing like below:

    telnet xxx.xxx.xxx.xxx
    script.sh 

    and the script is sumthing like below:

    #!/bin/ksh
    USER='xxxx'
    PASSWD='xxxx'
    NOW=$(date '+%Y%m%d%H')
    GRABDATE=$(date '+%Y%m%d')
    YDAY=$(TZ=CST+24 date +%Y%m%d)
    mkdir aaaa$GRABDATE
    ftp -n xxx.xxx.xxx.xxx <<SCRIPT
    user $USER $PASSWD
    binary
    lcd aaaa$GRABDATE
    cd xx/xx/xx
    prompt
    mget *$NOW*.zip
    bye
    SCRIPT

     

    ghostdog74



      Specialist

      Thanked: 27
      Re: Script
      « Reply #1 on: December 12, 2009, 10:51:57 PM »
      then you should check with your sysadmin whether they have done something to your account or the server to restrict your execution of the script.

      sya

        Topic Starter


        Greenhorn

        Re: Script
        « Reply #2 on: December 13, 2009, 12:41:46 AM »
        uh.. :(