Delete Set public Set private Add tags Delete tags
  Add tag   Cancel
  Delete tag   Cancel
  • • DevOps notes •
  •  
  • AI
  • Tags
  • Login

Special Permissions (SetUID, SetGID, Sticky Bit)/shaare/cb3cog

  • linux
  • linux

  • chmod u+s xyz.sh → add SetUID (user-level special permission)
  • chmod g+s xyz.sh → add SetGID (group-level special permission)
  • chmod u-s xyz.sh → remove SetUID
  • chmod g-s xyz.sh → remove SetGID
  • find / -perm /6000 -type f → find all executables with SetUID/SetGID

⚠️ SetUID/SetGID works only for C/C++ compiled binaries, not Bash scripts.

Sticky Bit

  • Protects files from deletion by non-owners
  • Example: ls / → shows sticky bit as t in rwxrwxrwt
  • chmod +t file/dir → assign sticky bit

    • Only the creator can delete contents of that folder, even with full permissions
1 month ago Permalink
cluster icon
  • Screen & Tmux : Screen (Terminal Multiplexer) Multi-terminal sessions in one window Alt+A | → split vertical Alt+A Shift+S → split horizontal Alt+A Tab → switch wind...
  • Alias Setup : alias l="ls -al" → define alias unalias l → remove alias Persistent Alias Config User-specific: ~/.bashrc Global: /etc/bashrc Add: alias l="ls -a...
  • Navigating File System / Linux filetypes : ls -l → List pwd → Print working directory dr-xr-xr-x | directories -rw-r--r-- | file Linux File Types Symbol Type - Regular file d Dire...
  • Crontab / at : Crontab Basics crontab -e → edit crontab crontab -l → list crontab entries crontab -r → remove crontab entries systemctl status crond → check crond s...
  • Linux File Ownership, ACLs, and I/O Redirects : File Ownership chown → Change ownership chgrp → Change group Access Control List (ACL) setfacl → Set file ACL getfacl → Get file ACL Add Permissi...


(19)
Filter untagged links
Fold Fold all Expand Expand all Are you sure you want to delete this link? Are you sure you want to delete this tag? The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community