> ## Content Index
> Fetch the complete content index at: https://linuxhandbook.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# LHB Linux Digest #26.21: Permission Denied Decoded, Container UIDs and Kubernetes Certifications
- URL: https://linuxhandbook.com/newsletter/26-21/
- Published: 2026-12-04T12:34:54.000Z
- Updated: 2026-12-04T12:34:54.000Z
- Description: The file looks fine. Something else says no.
- Author: Abhishek Prakash
- Tags: Newsletter

Last week I shared about the 50% off on the official Linux and [Kubernetes certifications](https://www.awin1.com/cread.php?awinmid=85919&awinaffid=429005&ued=https%3A%2F%2Ftraining.linuxfoundation.org%2Fcertification%2Fcertified-kubernetes-administrator-cka%2F&platform=pl&ref=itsfoss.com). 217 people opted for certification exams, mostly CKA and CKNE. Some were ambitious and went for [Kubestronaut](https://www.awin1.com/cread.php?awinmid=85919&awinaffid=429005&ued=https%3A%2F%2Ftraining.linuxfoundation.org%2Fcertification%2Fkubestronaut-bundle%2F&platform=pl&ref=itsfoss.com), the mega Kubernetes certification bundle. Looks like everyone is setting their goals for 2027.

Remember that today is the last day of the offer (it ends at 23:59 UTC). Get the discounted exam today, prepare at your own pace and attempt it twice anytime in the next 12 months. It cannot get any better than this for DevOps career aspirants.

[Linux Foundation Black Friday Offer](https://www.awin1.com/cread.php?awinmid=85919&awinaffid=429005&ued=https%3A%2F%2Ftraining.linuxfoundation.org%2Fcyber-week-2026%2F&platform=pl&ref=itsfoss.com)

This also tells me something. Many readers are looking to get certified. So, I am planning on creating study materials and even videos focused on these certifications. We already have a [Kubernetes course](https://linuxhandbook.com/courses/kubernetes/). But that's for learning in general and doesn't guide you towards a CKA exam.

Linux Handbook's goal for 2027: Create certification preparation courses. 

## 🧵 Permission denied, but the file says yes

You run `ls -l`, the bits look right, and you still get "Permission denied". The file is rarely the culprit. Go through these in order:

**The path:** Every directory above the file needs execute (`x`) permission. One locked parent blocks everything below it. The terminal tip below shows how to find it in one command.

**The `+` at the end:** If `ls -l` shows something like `-rw-r-----+`, an ACL is attached and the usual bits are not the full story. Run `getfacl file` to see the extra entries. Watch for the `mask` line, which can quietly cap what named users and groups actually get (look for `#effective:`).

**Your groups:** Just added yourself to a group with `usermod -aG`? Your current session doesn't know about it yet. `id` shows the groups your shell has right now, while `id $USER` shows what the system has on record. Log out and back in, or use `newgrp` for that shell.

**New files with the wrong permissions:** That's `umask`. With the common `022`, new files get 644 and directories 755\. Shared project directories often need `002` so group members can write.

**On Fedora or RHEL?** SELinux has its own say. `ls -Z` shows the label, and `sudo ausearch -m avc -ts recent` shows what got blocked.

If you need a refresher on the basics, our [file permissions guide](https://linuxhandbook.com/linux-file-permissions/) and the [chmod](https://linuxhandbook.com/chmod-command/) and [chown](https://linuxhandbook.com/chown-command/) tutorials have you covered.

## 🐳 DevOps corner: root inside, nobody outside

Containers add their own twist. The kernel doesn't care about usernames, only numeric IDs. If the app in your container runs as UID 1000 and your bind-mounted directory on the host belongs to UID 1001, you get "Permission denied", even though both are called something friendly on their own side.

You should compare the numbers, not the names:

```
ls -ln ./data
docker exec mycontainer id

```

The clean fix is to run the container as a matching user with `--user "$(id -u):$(id -g)"` (or `user:` in Docker Compose). Resist `chmod -R 777`. It makes the error go away and opens everything else.

In Kubernetes, the same idea lives in the pod's `securityContext`:

```yaml
spec:
  hostUsers: false
  securityContext:
    runAsUser: 1000
    runAsGroup: 3000
    fsGroup: 2000
    fsGroupChangePolicy: "OnRootMismatch"

```

`runAsUser` and `runAsGroup` set who the processes run as. `fsGroup` makes mounted volumes group-owned by that GID so the app can write to them. On big volumes, Kubernetes changes ownership recursively at every mount, which slows pod startup, so `OnRootMismatch` tells it to skip that when the top directory is already right.

`hostUsers: false` turns on user namespaces, which [went GA in Kubernetes 1.36](https://www.infoq.com/news/2026/05/kubernetes-1-36-released/?ref=linuxhandbook.com). Root inside the pod maps to an unprivileged UID on the node, so a container escape lands somewhere far less useful.

If you are preparing for CKAD or CKS, `securityContext` is exam territory. The [official docs page](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/?ref=linuxhandbook.com) is worth a read.

## 💡 Quick terminal tip

A file's own permissions can look fine and you still get "*Permission denied*", because every directory above it also needs execute (`x`) permission. `namei -l` lists the owner, group and permissions of each part of the path, so you can spot the directory that's missing it:

```
namei -l /srv/app/data/file.txt

```

It comes with `util-linux`, so it's already installed on most distributions. Symlinks along the path are followed and shown. On SELinux systems, add `-Z` to see each part's security context too.

![](https://linuxhandbook.com/content/images/2026/12/namei-permission-denied.png)

## 📦 Self-hosting: Yamtrack

[Yamtrack](https://github.com/FuzzyGrim/Yamtrack?ref=linuxhandbook.com) is a self-hosted media tracker, a single place to keep track of everything you watch, read and play, from movies and TV shows to anime, books and games. It records your progress, scores and history, and it can log what you watch on Jellyfin, Plex or Emby automatically. It complements the media server setup in your homelab.

[GitHub - FuzzyGrim/Yamtrack: A self hosted media tracker.A self hosted media tracker. Contribute to FuzzyGrim/Yamtrack development by creating an account on GitHub.![](https://linuxhandbook.com/content/images/icon/favicon-defc5b6d-8671-4c4e-8bfa-7b938df983b0.png)GitHub![](https://linuxhandbook.com/content/images/thumbnail/Yamtrack-58408b89-cdfd-42d6-90a9-b1445e94d974.png)](https://github.com/FuzzyGrim/Yamtrack?ref=linuxhandbook.com)

## 🛠️ Tool discovery: isd

[isd](https://github.com/kainctl/isd?ref=linuxhandbook.com) a keyboard-driven terminal UI for managing systemd units, with fuzzy search, previews that refresh on their own, and automatic sudo when a command needs it.

[GitHub - kainctl/isd: isd (interactive systemd) – a better way to work with systemd unitsisd (interactive systemd) – a better way to work with systemd units - kainctl/isd![](https://linuxhandbook.com/content/images/icon/favicon-72bce2cc-55d1-46fc-9dbb-e166533dceab.png)GitHub![](https://linuxhandbook.com/content/images/thumbnail/isd-a9f3ee43-973a-473d-b820-4d0cad45e868.png)](https://github.com/kainctl/isd?ref=linuxhandbook.com)

## 😂 Geek humor

![](https://linuxhandbook.com/content/images/2026/12/linux-devops-rsa-meme.webp)

## 💌 Keep on loving Linux Handbook

Missed the previous editions? You can [access the newsletter archives](https://linuxhandbook.com/newsletter/). 

And since you are here, please tell me what kind of materials would you like to see more in the newsletter as well as on the web portal? Tutorials, commands, more tools in the newsletter, courses, [CTF games](https://linuxhandbook.com/ctf/command-conqueror/) and puzzles? Your feedback will guide me to make Linux Handbook useful for you.

I will be waiting for your feedback. Just hit the reply button.