I am using the current OpenSSH version on Debian 7.7 Whezzy, which is, according to dpkg, 1:6.0p1-4+deb7u2.
I configured OpenSSH to allow clients to connect using SFTP, and read and modify (upload or replace) arbitrary files in a chroooted environment.
I want a script to be triggered whenever a change (deletion, upload or replacement) occurs, and, if possible, as well if the change succeeded or failed.
For example, if Alice uploads a file /foo/bar.png, a script
notify.sh alice /home/alice/foo/bar.png UPLOAD SUCCESS would be invoked.
Is there a way to realize this?