permissions
File and user permissions
-
chage
Tested chage examples: reading the ageing settings, expiring passwords on a schedule, forcing a change, and expiring the whole account on a date.
-
chmod
Tested chmod examples: numeric and symbolic modes, recursive changes, setuid/setgid/sticky bits, permission audits, and troubleshooting.
-
chown
Tested chown examples: setting owner and group, -R over a tree, why a glob misses the dotfiles, and the reason you cannot give away a file you own.
-
id
Tested id examples: the three parts of the line, real against effective uid under a setuid binary, and the group a running shell has not picked up.
-
adduser, useradd and friends
Tested examples for adduser, useradd, usermod, deluser and the group commands: why Debian ships two of each, and the -aG that silently drops every other group.
-
passwd
Tested passwd examples: setting a password from a script, reading the status line, what a locked password does not stop, and expiring an account instead.
-
rm
Tested rm examples: -r and -rf, why a directory's permissions decide what you may delete, and three ways a command removes more than the files you named.
-
stat
Tested stat examples: reading size, mode, owner and the three timestamps, printing a single field with -c, and what stat says about a symlink.
-
sudo
Tested sudo and su examples: running one command as root, what the environment loses on the way, the redirect that still runs as you, and reading sudoers.
-
File permissions explained
The rwx/owner-group-other model, numeric vs symbolic chmod, umask, and why setuid/setgid on directories behave differently than you'd expect.
-
Find files without the permission denied noise
Why 2>/dev/null is the wrong fix for find's permission denied errors, and what -readable -prune does instead, including what happens to the exit status.
-
Permission denied
The message names the path and never the reason. Work out which check failed, which account was refused, and when the mode is not the thing doing the refusing.
-
sudo: command not found
On Debian, sudo is often simply not installed, and your user is not in the sudo group. Why the installer does that, and how to fix it from a root shell.