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 23,300 courses taught by industry experts.
Special directory bits: SGID and Sticky
From the course: Red Hat Certified System Administrator (EX200) Cert Prep: 2 File Access, Storage, and Security
Special directory bits: SGID and Sticky
- [Instructor] We can apply Special Bits on Directories just like we can do files. However, the behavior is different for directories. Set user ID or SUID has no effect on directories. Set Group ID or SGID provides group inheritance for files and directories created inside the directory. Unlike with executables, the sticky bit works on directories in Linux. When the sticky bit is set for a directory, only the owners of the files can delete them. It might be easier to show you how SGID works on directories rather than try to explain it. After I've shown you we can talk about it. In a terminal, let's create a directory and slash home for this exercise using MK DIR. Type in CD space slash home, and hit enter. Be sure that you are in slash home, and not your user's home directory. You can verify with PWD, now type sudu, space, MK dir, space accounting, and hit enter. Now let's verify it again with LS space dash L and hit enter. You can see that since we created it using sudu, it's owned…
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
-
-
-
-
-
-