No, you're not doing anything wrong. The problem relates to your use of a chroot; I was able to reproduce this without involving sshd
at all, just by running touch
in a chroot.
FSEvents is recording the events as occurring on the path in the chroot, e.g., /foo
rather than /vhosts/web/user/foo
.
This is almost certainly an OS X bug; whether you're going to get Apple to fix it any time soon is another matter. Your best bet is probably to use Apple's sandboxing (run sftp-server
with sandbox-exec
) rather than a chroot.