File PermissionsLesson 42Free preview
Bash Ownership (chown)
This lesson is part of Bash · All levels
Summary
The chown command changes the file owner to another user, and can simultaneously replace the group with the user:group format. These changes can generally only be made by root, for example after a file is created by a particular process. Option -R makes the change to be recursive to the entire contents of the directory.
Key points
- Chown user file replaces owner
- Chown user:group file replaces owner and group
- R applies to all the contents of the directory
- Usually requires sudo
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.