Skip to content
Skip to this exploration
All explorations

Practical self-hosting · beginner

03 · The container that could write too much

Understand Linux identities and filesystem access.

10 min 5 sectionsv1

What you can take away

  • Distinguish host privilege from the identity inside a container.
  • Use a disposable directory containing a harmless text file

Your trail through this idea

Checking saved progress…

A service starts perfectly as administrator and fails as an ordinary account. The tempting fix is to give everything more privilege. A better investigation asks which exact operation failed and which identity attempted it.

Prerequisite: complete the preceding lesson or bring its worksheet.

Mark sections complete when you choose. Reading alone does not mark them.

Understand the system

Linux access decisions concern the process identity and the target resource. A username is a human-facing label; numeric user and group IDs matter when files cross a host/container boundary. A directory may be readable yet not traversable, or traversable yet not writable. Fixing the wrong layer can leave the error unchanged while expanding access elsewhere.

Docker’s rootless-mode documentation explains a configuration in which the daemon and containers run without root privileges. That is distinct from setting a non-root user inside a conventional container. Neither choice automatically grants the application access to every host file it needs.

Checking saved progress…

Work through the case

Original failure case: a practice application needs to read a folder of learning modules. It does not need to change them. Write down the minimal operation, the account doing it, and the directory boundary. A read-only mount is a design match for this use. Giving the container the entire home directory would make the original requirement harder to audit.

Checking saved progress…

Make something useful

Try this

Original exercise

Use a disposable directory containing a harmless text file. Inspect its owner and mode with your platform’s file properties or ls -ld on that directory. Draw the host user, container user, and requested read operation. Predict what would happen if the directory lost traversal permission. Do not change production permissions or run recursive ownership commands. For any local experiment, record original permissions first and restore only the disposable target.

Checking saved progress…

Check your reasoning

A quick check · for your own learning

What should a permission investigation identify first?

Choose one answer

A self-study prompt. You can retry; this is not an exam.

Checking saved progress…

Keep the result and follow the sources

Success means you can name the missing permission and its scope before proposing a change. 'Permission denied' is an observation, not an instruction to disable access controls.

Sources and scope

  • Primary documentation or archival source, reviewed 14 November 2026. Additional direct links appear beside the claims they support.
  • Editorial basis: Ian's historical self-hosting questions and current repository inspection informed the case selection. Historical requests do not establish current deployment. Private chat records, credentials and host details are excluded.
  • Examples and exercises are original educational synthesis. External sources support the stated technical or historical context, not every hypothetical scenario.
Checking saved progress…

These checks are for reflection and practice. Your answers and reflection notes are not sent anywhere.

Back to all explorations