sya Topic Starter
Posts: 9
|
 |
« on: December 12, 2009, 06:11:52 AM » |
|
Hi, I am *censored* beginner in MS DOS.  Im currently using command prompt to telnet to this one server by using ftp. Before, i'm runninng prepared script to download data from this one server. the script is in .sh file (eg, script.sh) the problem is, suddenly i got this one message saying "permission denied" when i tried to run the script like usually i did. can you help me in solving this? perhaps i can get any command line that i can use to get rid the error message. Thank you in advanced.
|
|
|
|
|
|
|
ghostdog74
Thanked: 26 Posts: 1,511
|
 |
« Reply #2 on: December 12, 2009, 07:02:16 AM » |
|
@salmon .sh, by defacto, are considered shell scripts BUT they can mean anything. @OP, you are not making sense. describe your problem clearly. you telnet to the server by using ftp and then you run the script?? show us how you do that.
|
|
|
|
|
|
sya Topic Starter
Posts: 9
|
 |
« Reply #4 on: December 12, 2009, 07:18:35 AM » |
|
yup, i telnet the server and make directory. then only i run the script. the command is as below:
telnet xx.xx.xx.xx cd xx/xx/xx script.sh
until this point, the error msg saying "permission denied" pop out.
|
|
|
|
|
|
|
sya Topic Starter
Posts: 9
|
 |
« Reply #6 on: December 12, 2009, 07:34:52 AM » |
|
and the script is sumthing like below:
#!/bin/ksh USER='xxxx' PASSWD='xxxx' NOW=$(date '+%Y-%m-%d') YDAY=$(TZ=CST+24 date +%Y%m%d) mkdir RHSH_ALARM_$NOW ftp -n xx.xx.xx.xx <<SCRIPT user $USER $PASSWD binary lcd RHSH_ALARM_$NOW cd xx/xx/xx prompt mget $NOW*.csv bye SCRIPT
|
|
|
|
|
sya Topic Starter
Posts: 9
|
 |
« Reply #7 on: December 12, 2009, 07:36:24 AM » |
|
operating system?  window xp?
|
|
|
|
|
|
|
sya Topic Starter
Posts: 9
|
 |
« Reply #9 on: December 12, 2009, 07:40:02 AM » |
|
i just dun understand.. sorry that i really2 a beginner in this..
|
|
|
|
|
|
|
sya Topic Starter
Posts: 9
|
 |
« Reply #11 on: December 12, 2009, 08:01:53 AM » |
|
i see.. thanks so much.. i'll get u back if i'm not able to solve this.. 
|
|
|
|
|
ghostdog74
Thanked: 26 Posts: 1,511
|
 |
« Reply #12 on: December 12, 2009, 08:19:19 AM » |
|
I am not sure what you mean. The sh extension is commonly used in 'nix systems for Bash (or other shell) scripts. Given the OP's mention of 'script.sh' I think I made a reasonable point.
what i mean is, you can practically name your file with any extension you want, it doesn't mean anything. You can name a shell script without .sh and it will still work. However, in IT world, every one (almost) knows what the extension normally stands for, (hence defacto).
|
|
|
|
|
|
ghostdog74
Thanked: 26 Posts: 1,511
|
 |
« Reply #14 on: December 12, 2009, 09:13:45 AM » |
|
Ok, but script.sh and forward slashes in paths kindof says "not Windows", don't you think? And "#!/bin/ksh" at the top of the script says "Korn shell - UNIX!!!" rather loudly.
my first thought is he is telnetting to a unix machine. Otherwise, it might be possible that he is running cygwin or something. anyway, OP has to get his gears together and explain clearly one more time what he is doing.
|
|
|
|