Published on

STICKY, SUID, AND SGID

Authors
  • avatar
    Name
    Jimmy Lai
    Twitter

STICKY

A File With The Sticky Bit Enabled Has A “T” In The Last Character Of The Mode Field(For example, -rwx-----t). Back In The Day When Disk Accesses Were Slower Than They Are Today, when memory was not as large, and when demand-based methodologies hadn't been conceived, an executable file could have the sticky bit enabled and ensure that the kernel would keep it in memory despite its state of execution. When applied to a program that was heavily used, this could increase performance by reducing the amount of time spent accessing the file's information from disk.

When the sticky bit is enabled in a directory, it prevents the removal or renaming of files from users who have write permission in that directory (with exception of root and the owner of the file**.

SUID

SUID* allows users to temporarily assume the privileges of the file owner

GUID

SGID* enables temporary group ownership.

Sticky bit

The sticky bit ensures that users can only delete or modify their files within a directory.

EXXAMPLE OF EXECUTEABLE FILES IN LINUX - Suid Permnission

suid