Re: Identifying End of Tx in FTP -Reply

From: Laris Benkis (lbenkis@bank-banque-canada.ca)
Date: Fri May 29 1998 - 06:48:22 PDT

  • Next message: Bruce B. Platt: "Re: Speeds and feeds"

    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 <adamat_private> 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 2b30 : Fri Apr 13 2001 - 13:00:17 PDT