In this chapter, we have looked at the Linux permissions scheme. We have learned that there are two main axes on which permissions are arranged: file permissions and file ownership. For file permissions, each file has an allowance (or disallowance) on read, write, and execute permissions. How these permissions work differs for files and directories. Permissions are applied by using ownership: a file is always owned by a user and a group. Besides the user and group, there are also file permissions present for everyone else, called the others ownership. If the user is either the owner or a member of the file's group, those permissions are available to the user. Otherwise, there need to be permissions for others to allow interaction with the file.
Next, we learned how to manipulate file permissions and ownership. By using chmod and umask, we were able to get the file permissions in the way we needed. Using sudo, chown, and chgrp, we manipulated the owner and group of a file. A warning was given about the usage of sudo and the root user, since both can render a Linux system inoperable with very little effort.
We continued with an example of working with multiple users. We added three additional users to the system using useradd, and gave them the correct groups with usermod. We saw how those users can be members of the same groups and, in that way, share access to files.
Finally, we touched on some basics of advanced permissions under Linux. The Further reading section contains more information for those subjects.
The following commands were introduced in this chapter: id, touch, chmod, umask, chown, chgrp, sudo, useradd, groupadd, usermod, mkdir, and su.