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
From the course: Red Hat Certified System Administrator (EX200) Cert Prep: 2 File Access, Storage, and Security
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.…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
File and directory modes1m 19s
-
(Locked)
Change file and directory ownership3m 14s
-
(Locked)
Set permissions using numeric mode3m 2s
-
(Locked)
Set permissions using symbolic mode4m 46s
-
(Locked)
Initial permissions using umask4m 30s
-
(Locked)
Special file bits: SUID and SGID4m 59s
-
(Locked)
Special directory bits: SGID and Sticky5m 55s
-
(Locked)
Read access control lists3m 36s
-
(Locked)
Set access control lists (ACLs)5m 49s
-
(Locked)
Configure inheritance with default access control lists4m 27s
-
(Locked)
Delete access control lists4m 15s
-
(Locked)
Challenge: File access control2m 34s
-
(Locked)
Solution: File access control6m 54s
-
-
-
-
-
-