That's what i can't do. The file isn't on disk yet. My Pre STOR event just logs the filename in .ioFTPD.xdupe and return 0 if it wasn't there already, and 1 if it was. That way, no one can overwrite someone else file.
The solution I found is to make the xdupe log expire after 5 secs. So nobody can overwrite any file that was "STOR filename" in the last 5 secs. That should fix the cached file overwrite problem, and allow failed STOR command to be restart after 5 secs.
|