From the course: Cert Prep: LPIC-1 Exam 101 (Version 5.0)
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Special directory bits: SGID and Sticky - Linux Tutorial
From the course: Cert Prep: LPIC-1 Exam 101 (Version 5.0)
Special directory bits: SGID and Sticky
- [Instructor] SGID and sticky are special bits for directories. In a terminal, let's create a directory in slash home for this exercise using mkdir. Type in cd space slash home and hit enter. Now type in sudo space mkdir space accounting and hit enter again. Type in your password and hit enter a third time. Let's verify this by typing ls space dash l. We can see that the accounting directory exists and is owned by the root user and the root group. The reason it's owned by the root user and 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 space groupadd space accounting and hit enter. Now let's change the ownership of our accounting directory to the accounting group. Type in sudo space chown, which is change owner, space colon accounting, that's the…
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
-
-
-
-
-
-
-
-
-
-
-
-
-
Create and delete local user accounts4m 27s
-
Modify local user accounts4m 57s
-
Manage user passwords4m 15s
-
What is a file?2m 10s
-
Get file attributes3m 41s
-
Get extended attributes4m 13s
-
About standard Linux permissions1m 47s
-
File and directory modes1m 19s
-
File ownership4m 34s
-
Set permissions using numeric method3m 13s
-
Set permissions using symbolic method5m 16s
-
Default permissions using umask5m 51s
-
Special file bits: SUID and SGID3m 49s
-
Special directory bits: SGID and Sticky6m 26s
-
-
-