Grant access with intent
By the end: Read permissions, restrict your own file, and recognize account-changing operations.
The idea
Permissions have owner, group, and other classes. For files, r/w/x mean read/write/execute. For directories, x means traversal and w permits directory-entry changes when other checks allow them. Numeric bits are r=4, w=2, x=1: 640 is owner read/write, group read, others none. ACLs and other controls may also apply.
Your command toolkit
chmod
What it solves: Change mode bits deliberately.
chmod u=rw,go= notes.txt
ls -l notes.txt
This grants only the owner read/write permissions on your practice file. Do not use 777 as a generic response to access problems.
chown
What it solves: Understand ownership changes.
chown --help
chown changes owner and optionally group. Ownership changes commonly require elevated permissions; this lesson does not alter shared files.
useradd
What it solves: Understand creating a system account.
useradd --help
Account defaults differ by distribution. Plan the home, shell, groups, and purpose before creating an account in a disposable VM.
usermod
What it solves: Understand changing an existing account.
usermod --help
usermod -G replaces supplementary groups; -aG appends where supported. Review the full current membership before applying a change.
userdel
What it solves: Understand account removal and retained data.
userdel --help
Removing an account and deleting its home directory are distinct decisions. Audit owned files and service dependencies before any real removal.
Before you move on
Try the guided lab below. Compare the result with the explanation, then record your reasoning in the workbook. A missing optional program or a restricted environment is something to explain, not a reason to change system settings blindly.
Practice with evidence
- Predict the result
- Run the guided lab
- Compare the output
- Explain your choice
A worked example
Guided lab
si_lab=$(mktemp -d)
cd "$si_lab" || exit
printf 'Private practice note\n' > notes.txt
chmod 600 notes.txt
ls -l notes.txt
chmod 640 notes.txt
ls -l notes.txt
What to expect: The file changes from owner-only read/write to owner read/write plus group read. Its contents do not change.
Make it yours: Translate 600, 640, and 755 into owner/group/other permissions. Explain why a directory needs traversal permission and why public write access is rarely the fix.
Read further
- GNU Coreutils manual ↗www.gnu.org
Apply what you learned
Your private practice
Answers are private. Completion requires the correct knowledge-check answer and a written response when an activity is included.
Restore a downloaded workbook
Choose a recovery file for this course and version. Review the recovered copy before saving it to your account.
Ask a question or report a problem
Describe what needs attention. Your private answer is shared only if you select the option below.