Docker Concepts
Mount ownership and permissions
Mount mode and Linux permission checks are separate. Compare effective process identity and numeric ownership. User namespaces, rootless execution and host security policies affect the result. Example assumes the synthetic volume and its note from the ownership lab. Check directory traversal, numeric ownership, mode and the actual permission diagnostic; do not broaden permissions.
Formal Syntax & Structure
docker syntaxdocker
docker run --user UID:GID [OPTIONS] IMAGE [COMMAND]Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| UID:GID | string | Numeric user and group identity inside the container. |
Working Example
Example Snippetdocker
docker run --rm --pull=never --network none --user 10001:10001 -v bm-v06-ownership:/data:ro busybox:1.37 sh -c 'id; ls -ln /data/note'