Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#62595 - [buildah] Cannot run buildah as non-root user

Attached to Project: Community Packages
Opened by Matthew Critchlow (mcritchlow) - Friday, 10 May 2019, 16:51 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Friday, 10 May 2019, 19:49 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

I am running the latest version of buildah:

~ % buildah version
Version: 1.8.2
Go Version: go1.12.4
Image Spec: 1.0.0
Runtime Spec: 1.0.0
CNI Spec: 0.4.0
libcni Version: v0.7.0-rc2
Git Commit: e23314b1
Built: Fri May 10 07:23:56 2019
OS/Arch: linux/amd64

Trying to run any buildah command as a regular user, results in the following /etc/subuid error:

~/projects/personal/buildah-demos % buildah from centos
ERRO[0000] error reading allowed ID mappings: error reading subuid mappings for user "mcritchlow" and subgid mappings for group "mcritchlow": open /etc/subuid: no such file or directory

However, running any buildah commands as root works fine:

~/projects/personal/buildah-demos % sudo buildah from centos
Getting image source signatures
Copying blob 8ba884070f61 done
Copying config 9f38484d22 done
Writing manifest to image destination
Storing signatures
centos-working-container
~/projects/personal/buildah-demos % sudo buildah images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/library/centos latest 9f38484d220f 8 weeks ago 209 MB

Additional info:
* buildah 1.8.2 (this didn't work in the previous version either)
* This upstream bug is what I'm experiencing, though the reported 'fix' was re: OpenSuse https://github.com/containers/buildah/issues/1169#issuecomment-437572559
* It feels like something along the lines of what is suggested here might be necessary https://bbs.archlinux.org/viewtopic.php?pid=1760391#p1760391 but it's unclear to me if that's exactly the same issue here.

Steps to reproduce:
- Install latest buildah
- Run any buildah command as a regular (non-root) user such as: buildah images, buildah info, etc.
This task depends upon

Closed by  Bartłomiej Piotrowski (Barthalion)
Friday, 10 May 2019, 19:49 GMT
Reason for closing:  Not a bug
Comment by Bartłomiej Piotrowski (Barthalion) - Friday, 10 May 2019, 19:44 GMT
Not a packaging bug. You need to enable user namespaces and configure subgid and subuid files.
Comment by Bartłomiej Piotrowski (Barthalion) - Friday, 10 May 2019, 19:49 GMT
TLDR:

~ cat /etc/sysctl.d/userns.conf
kernel.unprivileged_userns_clone=1
~ cat /etc/sub*
root:100000:65536
bp:100000:65536
root:100000:65536
bp:100000:65536

As you can guess, my username is 'bp'.

Loading...