homelab log · entry 08
Building a Linux File Server for a Production Team
I’ve run production teams for years. Today I built the server one would work from.
What I did
I set up a shared file server on Ubuntu 24.04 for a fictional podcast team. Two shows. Six episodes. Raw, edit, and final folders for each one, built with a single brace expansion command.
Then I locked it down. Three users, two groups, three levels of access. A producer who can reach everything. An editor who can work in the shows but can’t touch the archive. An outsider who can see the front door and nothing behind it.
I didn’t stop at setting permissions. I tested them as each user and saved the results. Six tests. All six matched.
What broke
- A typo gave a user the shell
/bing/bash. She couldn’t have logged in. I found it in/etc/passwdand fixed it. usermod -Gwithout-awiped a user’s groups. On an admin account, that’s how you lose sudo.sudo -uasked for a password that doesn’t exist.sudo -lshowed why: my account could only run commands as root. I switched torunuser.- Wildcards stopped working once folders were locked, because they expand as you. Files first, then folders.
What I learned
Setgid puts new files in the right group. Umask decides whether that group can edit them. A shared folder needs both. I proved it: one teammate created two files, and the other could edit only one of them.
What’s next
Chapters 10 and up: processes, the environment, and shell scripting. The runbook in this repo is a list of commands right now. Next, it becomes a script.