Owner and group: chown, chgrp
Updated July 3, 2026
A file has an owner and a group. chown changes the owner, chgrp the group. Only root may change the owner.
sudo chown alice file # owner alice
sudo chgrp devs file # group devs
sudo chown alice:devs file # owner and group at once
sudo chown -R alice:devs dir/ # recursivelyThe alice:devs form sets owner and group in one command. The rwx permissions then decide what the owner and group may actually do with the file.
Used in
You need this in the lesson Users and permissions.