Second try mput failed


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Second try mput failed
# 1  
Old 02-06-2015
Linux Second try mput failed

I'm having few doubts with below questions not able figure out the reason:
  1. mput operation used via shell script failed with 550 code return from FTP - "Overwrite cannot be done". ( Having all permissions to this directory ) but why got failed.
  2. When trying to run the script again but now it got failed with 451 error code - " Requested action aborted. Permission denied". why not again with 550 error ?
  3. Now, running the mput manually succeeded - why no overwrite error(550) or permission denied error(451) this time ?

Working with Solaris machine - script will run in ksh shell.

Last edited by rbatte1; 02-06-2015 at 10:54 AM.. Reason: Added LIST=1 tags
# 2  
Old 02-06-2015
I think you need to provide a bit more detail first:-
  • Please show a listing of the remote directory itself (i.e. not the files within it)
  • If you run this 5 times in quick succession, is it consistent?
  • Please paste (in CODE tags) the session running ftp -inv so we can see what's actually being returned.
  • please confirm the client and server OS with the output from uname -a on each side
It's all just a bit too vague to have a sensible stab at it yet.



Robin
# 3  
Old 02-06-2015
Actually I'm trying to re post the file to the remote machine if it fails due some sort of network troubles so I'm capturing a log file for this and using '226' presence in it, if not there re-post the file.

the script tried to re-post the file it threw an overwrite error ( so what it means is we do have a HALF/INCOMPLETE file in remote machine ) right, but when I manually connect to the same remote machine and do the exact same command of mput <filename> present inside the script, it worked fine

the core part of script will be
Code:
ftp -n -v -i remote_machine << EOF > log_file 2>&1
user username pswd
binary
mput file_name
bye
EOF

After the above code having a if loop to check for '226' presence in logfile, if not present then do the same above code again ( this is where I get "Overwrite" error from script but manual try worked )

does has to do something with which shell i'm running it, the machine is set to bash and script is running through ksh. Solaris 5.10 is the version of OS.

I see we do have a command reget for getting a file again from remote machine to local machine like its going to presume from where it stopped. In the same way is there any command to do the opposite of it ie. reput

:::: FTP LOGS ::::
Code:
550 myfile_catch_me.txt: Cannot overwrite existing file.
451 Requested action aborted. Permission denied.

Any help/suggestion will be appreciated !!

Last edited by Don Cragun; 02-06-2015 at 04:36 PM.. Reason: Add CODE tags. Get rid of extra spaces in ICODE tags.
# 4  
Old 02-06-2015
Please DO NOT send private mail to try to get a response to a question in these technical forums.

Robin requested information from you 5 hours ago trying to get information that would help the volunteers here help you solve your problem. Most of the questions Robin asked remain unanswered. Please answer Robin's questions. Help us help you. I would also like to see the permissions on the files in the directory (as well as the permissions the directory itself) for the files you're trying to replace with mput.
This User Gave Thanks to Don Cragun For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

.netrc does not execute mput command

Hi all :D i' ve a script running on freebsd system: echo "Start FTP Transfer" cd /tmp/elaboralog ftp -i 192.168.27.147 2100 > /tmp/elaboralog/ftp_log_phase2That call .netrc machine 192.168.27.147 login user password 12345 macdef backup binary cd tmp/elaboralog mput *-file.txt... (19 Replies)
Discussion started by: mirrorx
19 Replies

2. Shell Programming and Scripting

mput question

I want to mput a file without extension, and while doing the mput i want to include the .txt as an extension to the file name. How can i do that? (2 Replies)
Discussion started by: wizardofoz
2 Replies

3. Solaris

Cygwin X Server error: xdmcp fatal error session failed session 23 failed for display

Hi, i got the following error when i tried to access the cygwin x server from a windows XP PC. "xdmcp fatal error session failed session 23 failed for display" Alternatively, when i tried to access the same Cygwin X Server from another windows XP PC which is on a different LAN... (3 Replies)
Discussion started by: HarishKumarM
3 Replies

4. UNIX Desktop Questions & Answers

How to grep and pipe to mput ftp

I am ptting the following into an FTOP script. date=`TZ="aaa24" date +'%Y%m%d'` # this gets Yesterday date . . . . mput < 'l | grep $Vdate' # the idea to grep a listing from a directory that has yesterday date in its file name then put it in the remote FTP server. How can I get it... (4 Replies)
Discussion started by: raouf@comcast.n
4 Replies

5. UNIX for Dummies Questions & Answers

Ok. I've have looked and failed.

What I want seems to me should be simple but so am I so.... I have a Unix server that is running a program we will say logged in as UserA. The program is outputting a bunch of stuff to the terminal. I would like to log in from my machine to the server as Either UserA, UserB or if needed... (2 Replies)
Discussion started by: Dishevel
2 Replies

6. AIX

SFTP Failed---Request for subsystem 'sftp' failed on channel 0

Hi, While I am trying SFTP my machine to another unix machine , it was working fine till 10 min back. But now i am getting the below error "Request for subsystem 'sftp' failed on channel 0" Could you please someone help me to solve or analyise the root cause... Cheers:b:, Mahiban (0 Replies)
Discussion started by: mahiban
0 Replies

7. Shell Programming and Scripting

SFTP - 'put' doing an 'mput'

Hi guys, I'm having a problem with F-Secure Unix. When I try a simple command; sftp> put local.test remote.test I expect that the local file local.test would be copied to the remote file remote.test However sftp is attempting to copy local.test & remote.test from the local machine, as if... (2 Replies)
Discussion started by: b0bbins
2 Replies

8. Shell Programming and Scripting

mput is not working in ftp script

1)In this script mput command is not working( not transfering multiple files, it is able to send single file) 2)here is the script to automate the ftp process . 3)for transfering files from one machine to other machine using ftp can anyone can give me the solution in this issue Script is... (6 Replies)
Discussion started by: gsri
6 Replies

9. Solaris

FTP limits - mput *

I am trying to upload via FTP 11,000 files in a Solaris 8 system. I am using Windows 2000 and its FTP client to upload the files. The command used is mput *.jpg.When the quantity of files reaches 10,000 the upload aborts. Is this problem related with the FTP client ? If yes, another FTP client... (2 Replies)
Discussion started by: waldecy
2 Replies

10. UNIX for Dummies Questions & Answers

mget and mput...

hello, i was interested in knowing if you can mget or mput a sequence of files: example- say i have a dir with 1000 files with the same extension e.g. *.sgi, is there a way to mget only the last 200 files? i would assume that there is a flag i would use, or something like: mget... (14 Replies)
Discussion started by: yoyomamma
14 Replies
Login or Register to Ask a Question