Solved

Remote call of a shell script using ftp

Posted on 1998-07-06
9
817 Views
Last Modified: 2013-12-26
I'm pretty sure I can do this, but I can't get it to work:
0
Comment
Question by:JetDiesel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 

Author Comment

by:JetDiesel
ID: 1294556
Edited text of question
0
 
LVL 3

Expert Comment

by:dhm
ID: 1294557
The SITE EXEC is not implemented on the HP ftp daemon.  (It's listed in the man page, but the daemon responds to a "SITE HELP" command with the list "UMASK   IDLE    CHMOD   HELP" -- EXEC is missing.)  I tried "SITE EXEC" against several other ftp servers (Solaris-5.5.1, IRIX-6.2, and Linux/RH5.1) and only RedHat recognized "SITE EXEC."  (Even RH didn't work -- probably a configuration issue -- but at least it didn't complain about the command.)

Why not re-write the question as "how can I do X?" instead of "how can I use ftp to run a command?" and maybe somebody will have a simple solution.
0
 
LVL 5

Expert Comment

by:n0thing
ID: 1294558
You can't do that with ftp, site exec is very limited and is mostly available with wu-ftpd deamon. It has been disabled by
default bacause of security problems. I would recommend you
to use remote shell (rsh), telnet ... to do that.

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Expert Comment

by:blowfish
ID: 1294559
What are you trying to do in your shell script prior to the FTP transfer.  Perhaps there's another way...You say that you are writing a script on a Windows machine to do the file transfer.  Will all of this be running unattended when implemented?
0
 
LVL 1

Accepted Solution

by:
notanexpert earned 300 total points
ID: 1294560
This is a pretty bulky solution .. and requires you to have access to the unix machine (which I assume you have). But theoretically, you could set up a directory on that unix machine that watches for new files. You could upload a textfile as a 'trigger', telling this daemon or whatever to excecute 'blah blah blah'. You could even use the contents of this text file as input to your daemon in case what you actually need to execute changes everytime you log on or whatever.

Now, I've never written a daemon, so I'm not sure how tough that would be. The only other way you co do this is set up a cron job to run every minute or something ... check for the file, and respond with the appropriate action, but that's a pretty messy solution. Basically, this isn't using the FTP protocal or anything to excecute a command, I know, but I think there should be a viable way of setting up some sort of 'trigger' system that would work on the unix end and watch for some particular upload 'key'.
0
 
LVL 1

Expert Comment

by:ksb
ID: 1294561
You can build a named pipe.  Attach the process to get the data to the named pipe and put stuff on the pipe.  Your FTP server might block puts to a pipe, but that could be fixed.

You could even use a portal filesystem .... but that would be using Nukes in a fish tank.

0
 
LVL 8

Expert Comment

by:MaDdUCK
ID: 1294562
No luck yet?
0
 
LVL 1

Expert Comment

by:arbitrary
ID: 1294563
Remote call of a shell script using ftp are just two things completely different embedded into one sentence you might execute shell command using ftp-daemon but that's a hole in the ftp-daemon the FileTransferProtocol is for transfering file
and not subsitue RPC which stands for remote process calls ,
and is being implemented on every POSIX unix system

0
 
LVL 1

Expert Comment

by:arbitrary
ID: 1294564
Remote call of a shell script using ftp are just two things completely different embedded into one sentence you might execute shell command using ftp-daemon but that's a hole in the ftp-daemon the FileTransferProtocol is for transfering file
and not subsitue RPC which stands for remote process calls ,
and is being implemented on every POSIX unix system

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question