CHAPTER 7Understanding Linux File Permissions

No system is complete without some form of security. A mechanism must be available to protect files from unauthorized viewing or modification. The Linux system follows the Unix method of file permissions, allowing individual users and groups access to files based on a set of security settings for each file and directory. This chapter discusses how to use the Linux file security system to protect data when necessary and share data when desired.

Exploring Linux Security

The core of the Linux security system is the user account. Each individual who accesses a Linux system should have a unique user account assigned. What permissions users have to objects on the system depends on the user account they log in with.

User permissions are tracked using a user ID (often called a UID), which is assigned to an account when it's created. The UID is a numerical value, unique for each user. However, you don't log into a Linux system using your UID. Instead, you use a login name. The login name is an alphanumeric text string of eight characters or fewer that the user uses to log into the system (along with an associated password).

The Linux system uses special files and utilities to track and manage user accounts on the system. Before we can discuss file permissions, we need to examine how Linux handles user accounts. This section describes ...

Get Linux Command Line and Shell Scripting Bible, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.