Do I have an option to forbid a user group or a sftpuser to set chmod +x?
The user shall be allowed to upload media files, but no php scripts to run for example.
Do I have an option to forbid a user group or a sftpuser to set chmod +x?
The user shall be allowed to upload media files, but no php scripts to run for example.
Yes : You can use a dedicated partition for sftpuser.
Once done, just disable executables on this partition ("noexec" in /etc/fstab).
This would look like :
Note that also have to chroot sftpuser and since sftpuser just needs to upload php files, it is also a good idea to restrict the account to sftp : chroot + only sftp