[SFTP] Possibility for Adding "ForceFilePermission" option

House Lee hlee at vendasta.com
Fri Dec 15 03:26:46 AEDT 2017


Hi,

I understand that if I specify `ForceCommand internal-sftp -u <umask>`, the permission of any files uploaded via sftp will be calculated by `<original permission> & ~umask`. However, this can be bypassed by the `-P` option of `put` command. We are developing a shared hosting platform, therefore we definitely don’t want our users being able to upload any executable files. We can not disable the x permission by umask because directories need the x permission. 

Is there any possible way to accomplish this? or is it possible to add a `ForceFilePermission` and `ForceDirPermission` option in the sshd_config ?

Thanks & Best Regards,
House



More information about the openssh-unix-dev mailing list