# SUID (set user ID) - when file executes it runs with owner's perms - high security risk - sudo-like perm - only functions on files - `sudo chmod u+s file_name` sets SUID bit for file - uppercase S = SUID without x perm - lowercase s = SUID with x perm - `sudo chmod 4777 folder_name` to set SUID and 777 standard perms for folder # SGID (set group ID) - when file executes it runs with perms of owner's group - functions on files+folders - `sudo chmod g+s file_name` sets SGID for file - uppercase S = SGID without x perm - lowercase s = SGID with x perm - `sudo chmod 2777 folder_name` to set SGID and 777 standard perms for folder - if you set SGID for a folder, files created thereafter will get the associated group instead of the creator's group # Sticky Bit - if you create a file within a folder that has sticky bit on, another user cannot delete/modify the file - `tmp` is read and writable to everyone so needs special default related to deletion/modification - `/tmp` and `/var/tmp` have sticky bit turned on by default - uppercase T = sticky bit without x perm - lowercase t = sticky bit with x perm - `sudo chmod o+t folder_name` sets sticky bit for folder - only functions on folders - `sudo chmod 1777 folder_name` to set sticky bit and 777 standard perms for folder