Error in ftping script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Error in ftping script
# 1  
Old 12-11-2006
Error in ftping script

Hi all ,
Can u please help me in this. I tried to just login server through the below script

SERVER="Server_NAME"
USER="i am user"
PASSWD="mypassword"

ftp -in $SERVER<<EOF
user $USER $PASSWD
mkdir Chanakya #To create directory with my name in $HOME
ls > list
put list
bye
<<EOF


When i ran the script error is

Please login with USER and PASS.
Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Create directory operation failed.


Please help me in this regard..

Thanks in advance

-Chanakya
# 2  
Old 12-12-2006
According to the error message, the logged user does not have rights to create folder, can you login there and try to create folder by invoking the command via CLI ?
# 3  
Old 12-12-2006
remove the last marker "<<" before EOF and try
# 4  
Old 12-18-2006
hi ,
Sorry for delayed response.

Sysgate:

Logged user have permission in that server to create a folder and for your infomation the folder got created also.

Jambesh :

I tried the way suggested even then the same errors.

Can u suggest another way.


Thank you

-Chanakya
# 5  
Old 12-19-2006
Computer

Quote:
Originally Posted by Chanakya.m

SERVER="Server_NAME"
USER="i am user"
PASSWD="mypassword"

ftp -in $SERVER<<EOF
user $USER $PASSWD
mkdir Chanakya #To create directory with my name in $HOME
ls > list
put list
bye
<<EOF


-Chanakya
i noticed some errors in your script.

Code:
USER="i am user"

this is incorrect. the username should be one word and no spaces allowed. if your real user has space the first word will be used as username and th next word after the space will be used as password. that can be a reason for the "Please login with USER and PASS" error. the script was not able to log in so therefore can not create your cirectory. it is also good to check the permission of the folder so you can verify if you have rights to create a directory.

Code:
mkdir Chanakya #To create directory with my name in $HOME

hash can be used in shell script except in this case. since you are inside the ftp prompt. remove it.

Code:
ls > list

it must be a typo error. remove ">".

everything should be ok.

many thanks Smilie
# 6  
Old 12-19-2006
hi Inquirer,
To confirm you there are no spaces in user name and the "#" in the script is not there in actual script. AS i informed in earlier the directory is created in the server but still these error are there. Can u suggest a better method now to get files from that server.

Thank you

-Chanakya
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl error file ftping

I am getting error while ftping the files to the particular destination. Source code $ftp->login() or die "not log on to destination server $server "; $ftp->cwd("$destdir") or die "\ not able to change directory to $destdir on $server ****\n"; Output: ... (1 Reply)
Discussion started by: ramkumar15
1 Replies

2. UNIX for Dummies Questions & Answers

ftping a Zip file

i want to sftp a .zip file.when i am doing get abc.zip thenabc.zip is getting copied to my home folder. but on clicking abc.zip on my home folder to open it i am getting error message as "Unable to unarchive abc.zip into <homefolder> name" How to sftp the Zip file Thanks (1 Reply)
Discussion started by: bmrout007
1 Replies

3. UNIX for Dummies Questions & Answers

Size limit for FTPing file

Is there any size limit for FTPing file from one unix system to another? (6 Replies)
Discussion started by: swarup2008
6 Replies

4. UNIX for Dummies Questions & Answers

How to remove junk (^Ò) character while FTPing

Hi All, I have been trying to FTP some data files from Windows directory to a UNIX server. The txt file in the windows contails the following data: "111~XYZ~1~Contact person’s phone number~COMMENTS~~~~" but the same line is appearing as "111~XYZ~1~Contact person^Òs phone number~COMMENTS~~~~"... (8 Replies)
Discussion started by: vkumbhakarna
8 Replies

5. UNIX for Dummies Questions & Answers

Script for FTPing files to mainframe GDG

Hi, Request Unix gurus to kindly share a script which FTPs multiple files from Unix to a Mainframe GDG. The script should check for oldest file named as 'abc*.txt' in a directory '/dir/child'. FTP that file to MF, then remove the file from unix and then look for the next oldest file to be... (1 Reply)
Discussion started by: dsrookie
1 Replies

6. Shell Programming and Scripting

removing files after ftping

Hi All, I'm trying to write script to ftp some files and then need to remove these files from server. Is there any way to keep the condition that the file should be removed only after successfully transfered to the destinatino server? If in case, the file isn't been transferd, it should not be... (5 Replies)
Discussion started by: im_new
5 Replies

7. UNIX for Dummies Questions & Answers

ftping a file based in the size

Hi, I want to connect to a remote machine using FTP, check for the size of a file there. If it is 0 bytes, then there is no need to ftp else i have to ftp the file. Any help will be highly appreciated. (7 Replies)
Discussion started by: vikas.rao11
7 Replies

8. UNIX for Dummies Questions & Answers

FTPing from XP to Solaris

Hello. I'm new to Unix. I've got a SUN Ultra 10 running Solaris 5.7 and I'm trying to FTP to it from my XP PC. My PC has an IP address of 10.0.0.3 and a Subnet of 255.255.255.0. I'm connected to the Sun machine with a crossover cable. I type "ifconfig hme0 10.0.0.5" in a shell window (as... (3 Replies)
Discussion started by: dtferreira
3 Replies

9. UNIX for Dummies Questions & Answers

Ftping through unix script

Hi all, I am trying to write a script to connect to remote host and ftp some files there. The problem i am facing is,I dont know how to specify username and password for remote host through scripting. and even if i am able to connect to remote host,then how should i execute commands like mput... (17 Replies)
Discussion started by: Shiv@jad
17 Replies

10. UNIX for Advanced & Expert Users

FTPing over COM port ???

Hello. Can someone please help, or give me any advice. The company I work for has a unix machine and works over the com port rather than IP. We need to retrieve some files from it onto another unix machine and we are trying to get an ftp program to work, does anyone know any ftp programs that... (1 Reply)
Discussion started by: badge
1 Replies
Login or Register to Ask a Question