problem picking up files after ftp transfer
I have a Java file handler sitting on an ftp machine, which picks up files after they have been uploaded by a remote user.
There are 250 users, each with their own 'home' directory on the server.
Traditionally, my code has monitored the last modified date on all 250 folders, as ftp transfers have always updated the LMD when the transfer is complete.
However, I have moved this code to a new server, and on this environment, the LMD gets updated at the beginning of the ftp transfer, so my code is picking up files before the transfer is complete, resulting in file truncation.
Servers in question are all Red Hat Linux ES, the old server was version 2, the new server is version 4.
Does anybody now how to either:
a: Tell the OS to modify the LMD after the transfer is complete
or
b: Use Java to determine if the file is finished being built.
|