From the course: Linux CentOS 7: Files and Permissions

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Set permissions using numeric method

Set permissions using numeric method - Linux Tutorial

From the course: Linux CentOS 7: Files and Permissions

Start my 1-month free trial

Set permissions using numeric method

- [Instructor] There are two different methods of setting permissions in Linux. Numeric, and symbolic. Let's talk about numeric mode now. We have three positions in Linux permissions. User owner, group owner, and other. We can set read, write, and execute permissions on files and directories. In numeric mode, we assign a value to each permission and add the numbers to get the final result. Read access has a value of four. Write access has a value of two. And Execute is worth one. To set read, write, and execute for the user owner, we'd add up four plus two plus one for a total of seven. To set read and execute for the group owner, we'd add up four and one for a total of five. And for other, we don't give any permissions so we'll set it to zero. Now we'll use this number in all three positions. User owner, group owner, and other. The command we use to set permissions is chmod. Or change mode. The syntax for chmod is, chmod, space, options, space, permissions, space, file name. Let's go…

Contents