sftp adds write permission when transferring a file. This is presumably so that it can have access to the file while writing it. However, when it later sets the permissions, it uses the permissions which included the added write access. As a result the access does not match the original mode.
Created attachment 165 [details] Change for sftp to preserve permissions This is a possible solution to the problem
Created attachment 166 [details] Change for sftp to preserve permissions this is a possible fix for the problem
Created attachment 190 [details] Fix permissions on download shorter fix
Applied - thanks.
Mass change of RESOLVED bugs to CLOSED