|
hmm. still no answers. What about writing a script in shell or perl that runs as a daemon and watches the log files? When an entry shows that a user has transferred files, run rsync on their home directory. There are some tricks to this. You have to make sure the logging level is such as to give you what you need, and you need to know how to read the added tail on a log file (keep your place when another program has written to the file).
Another shot in the dark might be to figure out how openssh connects with its sftp module (not the same as /usr/bin/sftp, possibly /usr/libexec/sftp-server?). If that is a binary that is called when someone does an sftp, you could move it to, say, sftp-server-real, and put a script in its place that calls it and then does the rsync. I've done that with some other sorts of things, like the lp binary, but I don't know if the ssh/sftp connection is amenable to that approach. One difficulty here is figuring out how to get the user who was running it. You might try doing a sizable scp and then looking at processes on the server side to see what it is doing. There is likely to be a root process and a process under the name of the user doing the scp.
Anyway, if nobody comes in with any more concrete ideas, those are a couple of things you could poke at and think about.
|