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

Special file bits: SUID and SGID - Linux Tutorial

From the course: Linux CentOS 7: Files and Permissions

Start my 1-month free trial

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…

Contents