I've set up an sftpusers group on my CentOS box and am using the internal SFTP service to allow users to upload files to a chroot-configured directory.
The owner of the directory is root, and its group is sftpusers, and they have read/write permission on it which allows them to upload files via SFTP.
What I'd like is to disallow the deletion and reading of remote files straight after they upload them, so that anything they upload is stuck there permanently, and other people using the same login can't read or delete each others' files.
So my questions:
1) Is there a way to do this using simple permissions?
2) Is there a way to set the "default permissions" of any files uploaded by a member of sftpusers group? So that once they upload a file it is automatically un-readable or whatever?
3) Is there otherwise a way to do this which doesn't involve a cron script running every minute or whatever to change the permissions?
4) Is there a way to run a script (or otherwise trigger some event) straight after a file finishes uploading? Some kind of "onFileFinishUpload" event type thing I can hook into somehow?
Cheers!