From the course: Red Hat Certified System Administrator (EX200) Cert Prep: 2 File Access, Storage, and Security

Unlock the full course today

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

Initial permissions using umask

Initial permissions using umask

- [Instructor] When files are created, initial permissions are applied automatically. These permissions are calculated based on a bit mask called umask. To see a umask, type into a terminal umask and hit enter. We can also view the umask in symbolic notation by using the dash capital S option. Type in umask space dash capital S and hit enter. The umask can have either three characters or four. Feel free to add the leading zero or leave it off as standard permissions. Notice that the umask isn't the same format as numeric permission, such as seven, five four is actually upside down since it's a mask. To calculate initial permissions, we'll have to subtract the umask from maximum allowed initial permissions based on whether the item is a file or a directory. For directories, our maximum initial permission are 777 since having execute on a directory does not create a security risk. Let's use a umask of 022. Now let's subtract the umask from the maximum initial permissions of a directory.…

Contents