sftp

Dave Mason dmason-bqArmZWzea/GcjXNFnLQ/w at public.gmane.org
Mon May 30 17:52:58 UTC 2011


On May 30, 2011, at 12:54, Lennart Sorensen wrote:

> On Sat, May 28, 2011 at 10:01:11AM -0400, Kevin Cozens wrote:
>> If the ftp daemon is spawned using inetd you could configure inetd
>> to run a shell script instead which would do the prelogin stuff, run
>> sftpd, then run other things after sftpd terminates. If sftpd is
>> running all the time, this won't work.
> 
> sftp is not a daemon, it is a subsystem of sshd.  It works over an
> ssh connection, but not using the shell.

Indeed.  You could move the sftp executable and put a shell script in its place that did what you wanted and then called sftp.  You'd probably need to use trap(1) if you want to do anything after the real sftp is done, as the connection may have dropped, etc.

../Dave

--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list