Description
Hi!
I use the zabbly 6.0-stable packages on an Ubuntu 20.04 amd64 host (an incus vm) with 5.4.0-205-generic kernel (5.4.0-205.225-generic) and have a cron job that does this on the host:
incus file push /path/to/file container/path/to/dir/
The cron job runs as root (but the problem remains when running manually as non-root), the source is root owned, the target is an Ununtu 18.04 container and the target dir is owned by root within the container. The container uses a dedicated uid range (idmap.isolated is true, idmap.size is 1000000, idmap.base 7000000).
After upgrading to 1:6.0.3-ubuntu20.04-202501311435 from 1:6.0.3-ubuntu20.04-202412201836, this command fails with:
Error: error receiving version packet from server: server unexpectedly closed connection: unexpected EOF
and I see this in the logs:
Feb 15 13:10:01 srchost incusd[1107]: time="2025-02-15T13:10:01-06:00" level=error msg="SFTP server stopped with error" err="exit status 1" instance=dstcontainer instanceType=container project=default stderr="error: setns: Invalid argument\nerrno: 22"
Feb 15 13:10:01 srchost incusd[1107]: time="2025-02-15T13:10:01-06:00" level=warning msg="Failed copying SFTP instance connection to remote connection" err="read unix @->/proc/self/fd/23/forkfile.sock: read: connection reset by peer" instance=dstcontainer local=/var/lib/incus/unix.socket project=default remote=@
Downgrading back to 1:6.0.3-ubuntu20.04-202412201836 resolves the issue.
I saw this issue that may be related but seems different: #1614