Visit Our UNIX and Linux User Community

FTP client is hanging very rarely!

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting FTP client is hanging very rarely!
# 1  
Old 12-14-2009
FTP client is hanging very rarely!


I have a script in which I am using ftp to transfer some files from remote -> local and vice versa, this scripts is invoked by cron. for your reference I am sharing the function also :

	set -x

	ftp -v -n ${1} <<EOF > $ftplog
	open ${1}
	user ${2} ${3}
	cd ${5}
	lcd ${4}
	put ${6}


Now my problem here is that I can see some of the hanged client ftp processes when I issue "ps -ef | grep ftp" but this is very rare and till now it happend only 3 times while this is running from a long time.

I have checked in FTP server, I can not see any socket connection established for client, but at client side I can see.

Any idea what is going wrong?

# 2  
Old 12-14-2009
If you replaced:
	ftp -v -n ${1} <<EOF > $ftplog

	ftp -v -n ${1} <<EOF >> $ftplog 2>&1

Then each run will append the log file and the error message will go into the log file also so you can then see what happened several cron runs ago.
It would then be advisable to use logrotate(8) or something similar to roll the log file at regular intervals.

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Issue with ftp hanging

I could have sworn I posted on this issue earlier a couple of weeks ago but now cannot find the thread to add some updated info so I guess I'll start from scratch. Running on Oracle Linux 5.6, 64-bit. I have a weekly job that does an ftp 'mget' to copy a bunch of files from a production... (12 Replies)
Discussion started by: edstevens
12 Replies

2. Shell Programming and Scripting

AIX FTP client

I am trying to transfer logs from Aix 6.1 to a linux appliance but it is not happening from last one month if i execute the batch command by command i can execute well but if i do it in shell script it is stuck without any error. Any one know how to generate a FTP client trace to know the issue... (10 Replies)
Discussion started by: ra8ul
10 Replies

3. Shell Programming and Scripting

Connecting to a server using FTP is hanging

Hi Friends I have created a shell script to connect to a windows server. But the problem is while trying to run the script I am not getting any output. After running the script it is hanged and the prompt is not showing until if I press the ctrl+Z to break the script. I also tried using the FTP... (2 Replies)
Discussion started by: Kannannair
2 Replies

4. Red Hat

Implement FTP server on RHEL server without using FTP client

We have RHEL 5.8 in our environment, I had a query whether we can implement an FTP server using vsftpd package and Linux configurations like setsebool without using any external FTP clients like FileZilla etc. I am very confused on this. The FTP functionalities that should be present are download &... (3 Replies)
Discussion started by: RHCE
3 Replies

5. UNIX for Advanced & Expert Users

Dummy FTP Client!

We're just about to start testing a new server build. The application has many FTP/SFTP connections going to different servers. I'd like to temporarily replace the FTP/SFTP binaries with a mock version that will allow us to run all our production code as is, but will prevent the FTPs from actually... (1 Reply)
Discussion started by: JerryHone
1 Replies

6. Solaris

A good ftp client

Can anyone please suggest a agood ftp client(GUI) which would support sftp ...on solaris. I badly need it. I keep doing the transfers frequently, and some of them are binary and I am not sure how I change the mode to binary. To avoid this and other hassles, it would help if i have a GUI client. ... (6 Replies)
Discussion started by: Naanu
6 Replies

7. AIX


I'm currently investigating the secure ftp connection from AIX using shell script - It looks openssl is already install and don't know command to be used to connect the secure ftp server. 1. Do I need to install certificate on AIX ?. 2. If any one already design the script to connect secure... (0 Replies)
Discussion started by: dharanir
0 Replies

8. UNIX and Linux Applications

Secure FTP Client that Logs well

Folks I am on a quest.... I am looking for a lightweight FTP client capable of FTPS and or SFTP that has good audit and logging capabilities without requiring a central server component. My platforms are Linux, Solaris, AIX, and Windows Server. The kicker is I have found things that meet the... (3 Replies)
Discussion started by: ArtF
3 Replies

9. UNIX for Dummies Questions & Answers

FTP Client

Is there any ftp CLIENT(either freeware or sharware) can support passive mode else ncftp? Thanks! (2 Replies)
Discussion started by: coolmans
2 Replies

Featured Tech Videos