From the course: Linux CentOS 7: Files and Permissions
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Special directory bits: SGID and Sticky - Linux Tutorial
From the course: Linux CentOS 7: Files and Permissions
Special directory bits: SGID and Sticky
- [Instructor] SGID and Sticky are special bits for directories. In a terminal, let's create a directory in /home for this exercise using mkdir. Type in cd /home and hit Enter. Now type in sudo mkdir accounting and hit Enter again. Type in your Password and hit Enter a third time. Let's verify this by typing in ls -l, and we can see that the accounting directory exists, and is owned by the root user in the root group. The reason it's owned by the root user in the root group, is because we elevated privileges when we created it. The permissions for the user owner are rwx, the group owner is rx and for other is rx. Now let's create a group called Accounting. Type in sudo groupadd accounting and hit Enter. Now let's change the ownership of our accounting directory to the accounting group. Type in sudo chown, which is change owner, space :accounting, that's the accounting group, space accounting. So you should have sudo chown space :accounting accounting, hit Enter. Let's verify this with…
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
-
-
-
-
-
(Locked)
Standard Linux permissions overview1m 47s
-
File and directory modes1m 19s
-
(Locked)
File ownership4m 34s
-
(Locked)
Set permissions using numeric method3m 13s
-
(Locked)
Set permissions using symbolic method5m 16s
-
(Locked)
Default permissions using umask5m 51s
-
(Locked)
Special file bits: SUID and SGID3m 49s
-
(Locked)
Special directory bits: SGID and Sticky6m 26s
-
(Locked)
-
-