Owners and groups
Practice simulated chown and chgrp changes while checking account context.
Understand the pattern
Group ownership is a common way teams share access.
groups- List the groups associated with the training user.
Directory search permission also matters when accessing a file inside it.
chgrp- Change the file group within the permissions of the acting user.
A group name alone does not grant access unless membership and mode bits agree.
stat- Inspect a file or directory metadata record, including ownership, permissions, and size.
Metadata and file contents answer different questions.
Worked example and expected result
$ groupslearner learners sudo-readonly
Exit status: 0. The command completed successfully in the training fixture.
$ chgrp www-data /srv/www/index.htmlgroup www-data set on /srv/www/index.html
Exit status: 0. The command completed successfully in the training fixture.
$ stat /srv/www/index.htmlPath: /srv/www/index.html Type: file Mode: -rw-r--r-- Owner: www-data Group: www-data Size: 72 bytes
Exit status: 0. The command completed successfully in the training fixture.
Explain it
Apply it elsewhere
Keep the momentum.
Complete the lab, then explain and apply the pattern.
Next: Permission reviewTry an incident drillAnonymous lesson and mastery progress lasts for this session. Sign in to keep synced lesson XP between sessions; mastery stays device-local. No speed bonus, lost lives, or hint penalties.