I upload packages for Kali Linux, and indeed scp is just sftp, so 'ssh
chmod' is never going to work.
Also, the fact that dput tries to chmod only if one of the files has
permissions != 0644 made it hard to troubleshot. When I just update the
packaging revision for a package, uploads work without error. However if
I update the upstream version, it triggers the issue. Why? Because the
orig.tag.gz, created by uscan, has 0664 permissions, while other files
created by dpkg, have 0644. It's caused by my umask of 0002, which comes
from a change in trixie, amazingly undocumented:
https://bugs.debian.org/1068674.
Put all of that together, and these intermittent failures have been
bugging me for ~ 2 years, before I finally took the time to nail it down.
Mandatory failure logs for completeness:
```
This service allows sftp connections only.
Warning: The execution of 'ssh' as
'ssh kaliupload@urania.kali.org chmod 0644
/srv/repo.kali.org/incoming/python-sqlalchemy-schemadisplay_2.0-0kali1.dsc
/srv/repo.kali.org/incoming/python-sqlalchemy-schemadisplay_2.0.orig.tar.gz
/srv/repo.kali.org/incoming/python-sqlalchemy-schemadisplay_2.0-0kali1.debian.tar.xz
/srv/repo.kali.org/incoming/python-sqlalchemy-schemadisplay_2.0-0kali1_source.buildinfo
/srv/repo.kali.org/incoming/python-sqlalchemy-schemadisplay_2.0-0kali1_source.changes'
returned a nonzero exit code.
Error while fixing permissions.
```
Please drop the chmod entirely if it's straightforward! I can propose a
patch if you're open to this change.
Cheers,