OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
NFR Wizards Archive: Re: Identifying End of Tx in FTP -Reply

Re: Identifying End of Tx in FTP -Reply


Laris Benkis (lbenkisbank-banque-canada.ca)
Fri, 29 May 1998 09:48:22 -0400


I have had a number of useful replies to this query. The two suggestions
that seem to make sense are using lsof or fuser. Since fuser runs faster
and is distributed with Solaris it seems to be the logical choice unless
anyone has a reason that lsof should be used.

Laris

>>> Adam Shostack <adamhomeport.org> 05/29/98 09:16am >>>
Laris Benkis wrote:
| We have a system in place where clients drop off files via FTP to a
| wu-ftp server which are then processed automatically by scripts. Files
| have to be processed relatively quickly for the application to work
| properly therefore the convention we have developed is to indicate end
| of transmission by doing a rename of the file once the initial put is done.
| We are trying to tighten the security of the whole process and want to
| use FW1 ftp resources to limit where puts can be done. Unfortunately it
| turns out that when the ftp resources are used it is no longer possible
to
| do rename.

| What is a reliable, transparent way to tell that an ftp transmission has
| been completed?

        Depending on the OS, open(file, O_EXLOCK, mode) might work.

        You can also look at using lsof (ls open files) to see what
files are open, or looking at the wu-ftp process to see what files it
has open. (If your system has a /proc/$PID/fd/ type structure this
could be very easy.)

Adam

-- 
"It is seldom that liberty of any kind is lost all at once."
					               -Hume



This archive was generated by hypermail 2.0b3 on Sat Jul 17 1999 - 07:10:54 CDT