I want to monitor changes made a folder that is mounted via SSHFS.

I have tried iwatch but it does not notify when a new file is created, below is the syntax I am using with iwatch:

iwatch -e create /mnt/mme01/

Any idea why this is not working and how it can be achieved?


SSHFS doesn't implement the inotify API. Making that work would require a fundamental redesign for two reasons:

  • SSHFS uses SFTP to communicate with the server. The SFTP protocol has no facility to be notified of file changes on the server side. The server might not even have a file change notification mechanism — this could be made an optional feature of the protocol, but SFTP simply doesn't include this.
  • SSHFS is built on FUSE, and FUSE doesn't provide an interface to inotify, so FUSE filesystems will never generate any inotify events.

You'll have to set up your watch on the server side.

ssh server.example.com inotifywait -m -e create /path/to/mme01 | …
  • Many thanks Gilles! I will check out your recommendation! – Adigun Gbenga Jun 11 '15 at 13:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.