From the course: Linux CentOS 7: Files and Permissions
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Special file bits: SUID and SGID - Linux Tutorial
From the course: Linux CentOS 7: Files and Permissions
Special file bits: SUID and SGID
- [Instructor] SUID and SGID are special bits for privilege escalation on executical files. The SUID bit allows non-user owners to execute commands with the privileges of the user owner. In a terminal, let's do a long list on slash USR slash bin slash SU, by typing in ls -l /usr/bin/su, and hit Enter. The first thing you may notice is that the file's bright red. This tells us something special is happening here. Let's take a look at the permissions. The permissions for the user owner are rws. Note that we can no longer see the user owner's execute position. The s in the user owner's execute position means we have the SUID bit set. If the s is lowercase, then the execute is also set. If the S is uppercase, then the execute permissions are not set. The case of the S is the only way to tell if execute permissions are set or not. When the SUID bit is set, and regularly users such as Bob executes it, their privileges get elevated to that of the user owners. In our example, Bob would be…
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
-
-
-
-
-
Standard Linux permissions overview1m 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
-
-
-