opencontainers / opencontainers/runc
Getting "mkdir /run/runc: permission denied" on CentOS when run as unprivileged user
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 13.5k
- Forks
- 2.3k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 30
Description
By default, runc uses "/run/runc" for container state. On CentOS the /run directory is owned by root and non-privileged user cannot write to it, so I'm getting this error:
mkdir /run/runc: permission denied
ls -la /
...
drwxr-xr-x 30 root root 1020 May 24 21:20 run
$ runc --version
runc version 1.0.0-rc93
commit: 12644e614e25b05da6fd08a38ffa0cfe1903fdec
spec: 1.0.2-dev
go: go1.13.15
libseccomp: 2.3.1
I'm running img which uses runc and I was wondering if there a way to overwrite the --root global option via environment variable and not command line argument ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with runc's CLI handling of the global --root option and reproduce the permission error as an unprivileged user on CentOS. Determine whether the state root can be selected without a command-line argument; done means an unprivileged invocation can use a writable state directory and no longer attempts to create /run/runc.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, linux
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100