Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Remote call of a shell script using ftp

Posted on 1998-07-06
9
Medium Priority
?
830 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
Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

 
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 600 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

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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 …
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.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

670 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