Discussion Locked
0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Using ftp to send files to remote server and I would like to execute a shell script on the remote server before ending ftp session. Is that possible? Using macdef init in .netrc file to carry out my ftp session. Tried using the command !script_name but it couldn't find the script and I suspect that it's because of my $PATH - how do I set that? I cd'd to the dir that had the script, and tried !./script_name - still no luck. Thanks, Danielle
3 replies
Here's my output when trying to execute the script manually:
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> !/var/opt/dci/QA19/interface/ftpout.sh
sh: /var/opt/dci/QA19/interface/ftpout.sh: not found.
The file is there:
QA19:/var/opt/dci/QA19/interface => ll | grep ftpout.sh
-rwxrwxrwx 1 editst ediT 553 Oct 18 12:59 ftpout.sh
by jaqui
1) did you chmod it to allow for execution?
2) does remote server allow you to run scripts?
3) no, ftp does not normally allow for script running on remote hosts.
I figured out my answer, in that I will have my script ftp the files and then use rexec to kick off my script on the remote server. Now my question is related to ftp and rexec sharing the same .netrc entry. Supposedly, rexec doesn't recognize the macdef init entry for the ftp command. But when execute rexec while the macdef entry in the .netrc file, I get a Memory Fault. Anyone have any ideas about that? Thanks!
This discussion is closed to new replies.
Trending Linux posts
Sort by Trending
0 helpful
7 replies
0 helpful
6 replies
Question Locked
RE: How to fix the Docker and UFW security flaw
0 helpful
3 replies
Discussion Locked
Which Linux works best on old phone or tablet?
0 helpful
5 replies
Discussion Locked
My Job and Company
0 helpful
3 replies