Module lessons (2/2)
Ownership and privileges (chown and sudo)
Change file ownership using chown and run commands with administrative privileges using sudo.
What you'll learn in this lesson
- Distinguish the responsibility of property (
chown/chgrp) from that of permitted actions (chmod). - Change the owning user, group, or both in a single command using the syntax
owner:group. - Use
sudo(superuser do) specifically to execute individual protected commands without permanently working as userroot.
Overview
Knowing which bits are on (rwx) is only half the equation: to determine to whom the owner and group rules apply, Linux associates each file system node with an Owner and a Group. To reassign them, privilege management comes into play.
In Linux a normal user cannot "gift" a file to another account for security (avoids bypassing disk quotas or deceiving services): elevation via sudo is needed:
Sections covered in this lesson
- 1Ownership and administrative privilege
- 2Progressive examples
- 3Practical exercises
- 4Quick check
Unlock "Ownership and privileges (chown and sudo)" and the full Linux Terminal curriculum
Change file ownership using chown and run commands with administrative privileges using sudo.
Unlock all 5 hands-on exercises in this lesson plus every advanced WebAssembly module with automated checks.
- Instant access to all advanced modules in Linux Terminal plus 17 more courses
- Hands-on browser exercises with automated test suites and solutions
- 14-day money-back guarantee processed via Paddle.com
14-day guarantee · Cancel anytimeModule 1, all 18 interactive games, and cheatsheets are always free.