-
There's no way to achieve this with simple permissions. Due to OpenSSH's sftp-server you won't be able to implement the full requirements list but depending on the filesystem the files are being uploaded to, you can leverage [attributes][1] and ACLs to achieve some of your requirements.
-
Yes, the sftp-server takes a -u parameter (you can set this in your sshd_config on the
Subsystem sftp
line) which sets the umask for all uploads. -
Yes, you can make use of inotify, one way may be with the incron tool although there are many ways to use inotify. Inotify allows you to have the kernel notify a userspace program on a filesystem event you identify, e.g. adding a file to a directory. You can then run a command on this event.
(3 Part 2)