Hi chaps and chappesses..
It's probably possible and really easy, but I don't know how... I want to dump a file in a directory and as soon as it appears to be executed then removed...
i.e ftp a file onto a server in a particular directory, once uploaded, the file gets executed immediately... Possible yes/no?
I'm sure I've heard that this can be done, just can't remember..
TIA
Simon
It's probably possible and really easy, but I don't know how... I want
to
dump a file in a directory and as soon as it appears to be executed then removed...
i.e ftp a file onto a server in a particular directory, once uploaded,
the
file gets executed immediately... Possible yes/no?
In linux, anything is possible :) What's the application of this, as that will help in determining a efficient solution?
--
Ashley T. Howes, Ph.D. http://www.ashleyhowes.com
"when all the animals of this world are gone, man will die of loneliness"
On Thursday 11 April 2002 9:38 am, Ashley wrote:
It's probably possible and really easy, but I don't know how... I want
to
dump a file in a directory and as soon as it appears to be executed then removed...
i.e ftp a file onto a server in a particular directory, once uploaded,
the
file gets executed immediately... Possible yes/no?
In linux, anything is possible :) What's the application of this, as that will help in determining a efficient solution?
--
Ashley T. Howes, Ph.D. http://www.ashleyhowes.com
"when all the animals of this world are gone, man will die of loneliness"
main@lists.alug.org.uk http://www.anglian.lug.org.uk/ http://lists.alug.org.uk/mailman/listinfo/main Unsubscribe? See message headers or the web site above!
The application... adding/removing users mainly using a web interface on a remote machine that creates a file containing the required commands to add and remove as necessary..
Simon
The application... adding/removing users mainly using a web interface on
a
remote machine that creates a file containing the required commands to add and remove as necessary..
What's wrong with the traditional remote access tools for doing this type of work, e.g. ssh, telnet, etc?
Also, I second Andrew's note of caution about doing this. What steps are you taking to ensure that the incoming file is from an authorative source and not from someone trying to fsck with your box?
Ashley
Its on a private network, so security isn't too much of an issue
Simon
On Thursday 11 April 2002 4:36 pm, Ashley wrote:
The application... adding/removing users mainly using a web interface on
a
remote machine that creates a file containing the required commands to add and remove as necessary..
What's wrong with the traditional remote access tools for doing this type of work, e.g. ssh, telnet, etc?
Also, I second Andrew's note of caution about doing this. What steps are you taking to ensure that the incoming file is from an authorative source and not from someone trying to fsck with your box?
Ashley
on Thu, Apr 11, 2002 at 04:43:41PM +0100, Simon wrote:
Its on a private network, so security isn't too much of an issue
The majority of break ins are internal, depending on who you listen to. Also, if the private network has any path to the outside world, it becomes a serious risk.
If you're only doing a limited set of operations, then perhaps an interpretted psuedo-language would be safer. e.g. Files take the form "<operation><SP><param>", where <operation> is one of {adduser,deluser, ...} and <param> depends on the operation.
On Thu, 11 Apr 2002, Simon wrote:
i.e ftp a file onto a server in a particular directory, once uploaded, the file gets executed immediately... Possible yes/no?
The easiest way is to set up a cron job that runs a script once every 5 minutes or so. The script checks for the existence of the file and if it's there, runs it.
Example of cron script:
#!/bin/sh if [ -f "file" ] then sh file else echo "No script ran" fi
Obviously, I'm sure I don't need to tell you that this is a REALLY DANGEROUS thing to do as you can never be sure what the file contains or who is uploading it. Proceed with EXTREME caution!
Andrew.