I have the following setup:
- Ubuntu 14.4 server offering SFTP service in a front-end area.
- External clients have the ability to upload files.
- A back-end process (on another server) tracks uploaded files, triggers some back-end tasks and modifies the files back according to the outcome of the tasks.
SFTP users have ownership of the files they upload. SFTP users and back-end process are members of the same group. With a umask of 0007, back-end process can access and modify these files.
However, some users upload files with 600'ish rights, making the back-end process unable to handle these files.
There are plenty of ways to restrict rights (umask, acl) but I could not find a way to automatically grant group access to files uploaded with too restrictive rights.
Is there a way to automatically transform files uploaded with 600 or 640 rights to 660?