Incus file push: can you prevent the implicit "chown"?

I’m getting this error on incus file push to a proxmox config directory which is within a mounted FUSE filesystem:

$ incus file push pveproxy-ssl.pem cluster0-host1/etc/pve/nodes/cluster0-host1/
Error: permission denied

However, the file is created successfully:

$ incus exec cluster0-host1 -- ls -l /etc/pve/nodes/cluster0-host1/pveproxy-ssl.pem
-rw-r----- 1 root www-data 2885 Feb  5 16:30 /etc/pve/nodes/cluster0-host1/pveproxy-ssl.pem

strace on the incus daemon shows:

[pid 786055] fchownat(AT_FDCWD, "/etc/pve/nodes/cluster0-host1/pveproxy-ssl.pem", 1000, 1000, 0 <unfinished ...>
[pid 786054] <... futex resumed>)       = 0
[pid 786055] <... fchownat resumed>)    = -1 EPERM (Operation not permitted)

(I’m running the incus file push command as uid/gid 1000/1000 on the host)

Is there a way to tell incus file push not to touch the file ownership? According to incus file push --help:

Flags:
  -p, --create-dirs   Create any directories necessary
      --gid           Set the file's gid on push (default -1)
      --mode          Set the file's perms on push
  -r, --recursive     Recursively transfer files
      --uid           Set the file's uid on push (default -1)

I though “default -1” might mean “don’t change the uid/gid”, but this doesn’t seem to be the case.

Providing the uid/gid that the file already has doesn’t help:

$ incus file push --uid 0 --gid 33 pveproxy-ssl.pem cluster0-host1/etc/pve/nodes/cluster0-host1/
Error: permission denied

Is there any way to bypass the fchown? And if not, perhaps at least a comment could be added to the docs for incus file push to say what the -1 default does?

Thanks,

Brian.

What Incus version is that on?

We’ve changed some of the file transfer/retrieval logic lately so just want to make sure we don’t spend too much time on logic that’s been eliminated :wink:

Sorry, I should have said: 6.0.3 LTS

The other thing is not a bug but can be annoying is that if I am running as a regular user (say uid=1000) in the incus-admin group, and do something like

incus file push foo bar/etc/hosts

then the /etc/hosts file becomes owned by uid 1000 inside the container. This means on every file push I have to remember to add --uid 0 --gid 0 --mode 644