opencontainers / opencontainers/runc

Can not mount devpts with error "operation not permitted"

Open
#1,646 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
13.5k
Forks
2.3k
Avg merge
2d 8h
Merged PRs (30d)
30

Description

Run a rootless container whose rootfs is set to /sdcard/hello/rootfs

$ run --root ./runc run hello

container_linux.go:296: starting container process caused "process_linux.go:398: container init caused \"rootfs_linux.go:58: mounting \\\"devpts\\\" to rootfs \\\"/sdcard/hello/rootfs\\\" at \\\"/sdcard/hello/rootfs/dev/pts\\\" caused \\\"operation not permitted\\\"\""

proc and tmpfs worked well. I don't know why devpts failed.
Is something missing about namespace or cgroup?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the stack-trace locations container_linux.go, process_linux.go, and rootfs_linux.go, then reproduce the rootless run with /sdcard/hello/rootfs and compare the successful proc/tmpfs mounts with devpts. Confirm the missing permission or setup requirement; done means devpts mounts successfully or the supported limitation and required configuration are recorded.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, linux
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.