I'm trying to write event based ftp server that notifies me when some user uploads any file(users will never do any delete or other stuff, they just upload). Apache ftpServer with ftplets is what I need but it is java based and does not satisfy my environment. So what I'm planning to do is to run vsftpd
and another process besides it which listens to IN_CLOSE_WRITE
event. When vsftpd
close the file descriptor after finishing file upload, my process will be notified and I will do some appropriate action. My questions are:
IN_CLOSE_WRITE
fired in other situations that I get inconsistent files instead of ready to use files?IN_CLOSE_WRITE
should work.