@@ -436,11 +436,16 @@ unset -nocomplain fileInfo continue } "file" { set fileInfo(size) [lindex $work 0] - set fileInfo(perms) [lindex $work 1] + + # We lower-case the permissions because upper-case permissions + # should not be set remotely as they may influence the security + # of the system. + set fileInfo(perms) [string tolower [lindex $work 1]] + set fileInfo(sha1) [lindex $work 2] set work [lrange $work 3 end] } "symlink" {