1

I am able to watch local directories using inotify kernel subsystem based solutions. There are some python projects too which are working on top of inotify like pyinotify, PyInotify, fsmonitor and watchdog.

I have mounted remote ftp server in local directory using curlftpfs so all syncing is easy now. But inotify is not able to watch network mounted points like local directories.

I want to track if there is new files added to ftp server. How can I achieve like I do for local directory using inotify based solution.

Alok
  • 7,734
  • 8
  • 55
  • 100
  • Assuming you can identify when new files show up, how do you plan on identifying when a file has been successfully and *completely* transferred? – Andrew Henle Nov 28 '17 at 11:59
  • I dont know exactly how does NFS/curlftpfs shows the files in local filesystem – Alok Nov 28 '17 at 12:34

1 Answers1

1

It can hardly work. The FTP protocol has no API to notify a client about the changes. The curlftpfs would have to continually poll the remote folder to provide the notification for inotify or other similar tool. It hardly does that.

You have to poll the FTP folder yourself.

See for example Monitor remote FTP directory.

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992