Hi Francesco,

On Fri, Jan 12, 2024 at 08:05:02PM +0100, Francesco Poli wrote:
> Indeed, the error does not seem to have anything to do with a "No space
> left on device" failure:
> 
> [...]
>   mke2fs 1.47.0 (5-Feb-2023)
>   mkfs.ext4: Permission denied while trying to determine filesystem size
>   E: setup failed: E: command failed: /sbin/mkfs.ext4 -d "$1/mnt" -L 
> autopkgtestvm -E 'offset=134217728,assume_storage_prezeroed=1' 
> 'sid_amd64.img' '25G'
> [...]
> 
> What can cause mkfs.ext4 to fail with a "Permission denied" error?

I think this is our typical problem when dealing with user namespaces. I
guess that the thing that fails here is mkfs.ext4 opening the target
image file (to be formatted). That file has earlier been chowned to the
root uid inside the namespace, so permission should be there, but you
need more. You also need execute permission (to the first uid of your
namespace) for the containing directory up until the root. I guess that
none of those are world-executable and not by chanced owned by your
first subuid nor owned by the first group in your subgid range. It's an
odd requirement and unfortunately one that is very difficult to get rid
of.

Can we accept and document this limitation for now?

Helmut

Reply via email to