Linux – What does the ‘S’ linux file permission mean

linuxpermissions

I've seen various Linux file permissions such as rwx and rws, but I have never seen the permission set rwS. Can someone please explain to me what the capitol 'S' stands for?

Best Answer

The capital S indicates the file has a setuid bit set but is not executable.

[root@host:/]$ touch file
[root@host:/]$ chmod 4755 file
[root@host:/]$ ls -l file
-rwsr-xr-x 1 root root 0 Jul 25 15:05 file
[root@host:/]$ chmod -x file
[root@host:/]$ ls -l file
-rwSr--r-- 1 root root 0 Jul 25 15:05 file