I ran into the same problem as pabs: $ mmdebstrap --include=ccache --customize-hook='chroot "$1" update-ccache-symlinks' --include=eatmydata --variant=buildd unstable ~/.cache/sbuild/unstable-amd64.tar.zst https://deb.debian.org/debian I: automatically chosen mode: unshare I: chroot architecture amd64 is equal to the host's architecture I: finding correct signed-by value... done I: automatically chosen format: tar I: using /tmp/user/1000/mmdebstrap.wx2t2Z4_xd as tempdir E: cannot create /tmp/user/1000/mmdebstrap.wx2t2Z4_xd: Permission denied; cannot create /tmp/user/1000/mmdebstrap.wx2t2Z4_xd//etc: Permission denied; cannot create /tmp/user/1000/mmdebstrap.wx2t2Z4_xd//etc/apt: Permission denied; cannot create /tmp/user/1000/mmdebstrap.wx2t2Z4_xd//etc/apt/apt.conf.d: Permission denied W: hooklistener errored out: E: received eof on socket
I: main() received signal PIPE: waiting for setup... I: removing tempdir /tmp/user/1000/mmdebstrap.wx2t2Z4_xd... env: cannot change directory to '/tmp/user/1000/mmdebstrap.wx2t2Z4_xd': Permission denied E: rm failed: 32000 E: remove_tree failed and here's the work-around that worked for me: $ TMPDIR=/dev/shm/mmdebstrap mmdebstrap --include=ccache --customize-hook='chroot "$1" update-ccache-symlinks' --include=eatmydata --variant=buildd unstable ~/.cache/sbuild/unstable-amd64.tar.zst https://deb.debian.org/debian I: automatically chosen mode: unshare I: chroot architecture amd64 is equal to the host's architecture I: finding correct signed-by value... done I: automatically chosen format: tar I: using /dev/shm/mmdebstrap/mmdebstrap.WGXoajHVS6 as tempdir I: running apt-get update... done I: downloading packages with apt... done I: extracting archives... done I: installing essential packages... done I: installing remaining packages inside the chroot... done done I: running --customize-hook in shell: sh -c 'chroot "$1" update-ccache-symlinks' exec /dev/shm/mmdebstrap/mmdebstrap.WGXoajHVS6 I: cleaning package lists and apt cache... done done I: creating tarball... I: done I: removing tempdir /dev/shm/mmdebstrap/mmdebstrap.WGXoajHVS6... I: success in 14.4525 seconds Francois

