Skip to content

Failing to chown #5

@anderspitman

Description

@anderspitman

Hey there. I'm trying to extract the alpine:3.15.2 docker image rootfs using the following config:

{
  "Name": "alpine:3.15.2",
  "Spec": {
    "Dest": "./out"
  }
}

It's failing with the following error:

ERROR	Failed to extract rootfs: chown out/rootfs/etc/shadow: operation not permitted

The reason is because /etc/shadow from the tar file is owned by the shadow group, which has id 42, which when combined with this line results in a gid my user doesn't have permissions to chown to.

Is there any way to run rootfs_builder as an unprivileged user? I'm assuming this would require using the users uid/gid for all the files in the tree. Not sure if this would cause other issues?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions