0%

0/1 Lessons

Introduction to Linux Server Operating Systems

• 30min

0 / 3 lessons complete

Linux Server Installation and Lab Setup

• 23min

0 / 6 lessons complete

Working with the Linux Command Line Interface

• 1hr 30min

0 / 12 lessons complete

User and Group Management

• 44min

0 / 7 lessons complete

Linux Storage

• 30min

0 / 6 lessons complete

Linux Administration Basics

• 53min

0 / 8 lessons complete

Linux Networking

• 47min

0 / 8 lessons complete

Course Conclusion

• 5min

0 / 1 lessons complete

Linux Octal and Symbolic Permissions

Instructions

Q&A (0)

Notes (0)

Resources (0)

Saving Progress...

Resources

There are no resources for this lesson.

Notes can be saved and accessed anywhere in the course. They also double as bookmarks so you can quickly review important lesson material.

Create note

In the Linux and Unix operating systems, file permissions are a crucial aspect of security and access control. They determine who can read, write, and execute files and directories.

Try using the calculator below grant permissions to different groups, and see the resulting octal and symbolic codes that are generated:

CHMOD Calculator

chmod 700
-rwx------
Owner Group Others
Read (4)
Write (2)
Execute (1)

Octal Representation

You may notice the 644 number in the example above. The octal representation consists of three digits, each representing the permission for the owner, group, and others, respectively:

  • Read (4): The ability to view the content of a file or list the contents of a directory.
  • Write (2): The ability to modify or create new content within a file or directory.
  • Execute (1): The ability to run or execute a file or access the contents of a directory.

So, the number used in the example above can be broken down as follows:

  • Owner: 4 (read) + 2 (write) = 6
  • Group: 4 (read)
  • Others: 4 (read)

Symbolic Representation

In symbolic representation, permissions are denoted by a set of three characters for the owner, group, and others, respectively. Each character slot can either have a character representing a permission or a - indicating the absence of that permission. The characters used are r for read, w for write, and x for execute. Here's a breakdown:

  • r (read): The ability to view the content of a file or list the contents of a directory.
  • w (write): The ability to modify or create new content within a file or directory.
  • x (execute): The ability to run or execute a file or access the contents of a directory.

The order of these characters is always the same: r, followed by w, followed by x.

Example:

Consider a file with permissions for the owner to read, write, and execute, for the group to read and execute, and for others to read only. The symbolic representation would be rwxr-xr--. Here's the breakdown:

  • Owner: rwx (read, write, execute)
  • Group: r-x (read, execute)
  • Others: r-- (read)

Converting Between Octal and Symbolic Representations:

It's important to be able to convert between octal and symbolic representations of permissions. Here's how you do it:

  1. For each set of permissions (owner, group, others), write down the symbolic representation (e.g., rwx, r-x, r--).
  2. Convert each symbolic representation to a sum of values based on the permission (e.g., rwx = 4+2+1 = 7, r-x = 4+1 = 5, r-- = 4).
  3. Combine these individual values to get the octal representation (e.g., 755).

So, the octal 755 corresponds to the symbolic rwxr-xr--.

Server Academy Members Only

Sorry, this lesson is only available to Server Academy Full Access members. Become a Full-Access Member now and you’ll get instant access to all of our courses.

0 0 votes
Lesson Rating
Subscribe
Notify of
profile avatar
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

profile avatar
gentib(@gentib)
Member
3 months ago

This is the best way yet I`ve seen permissions explained.
Good work!