CAP_FSETID
Keep set-user-ID and set-group-ID bits when a file is modified.
- Bit number
- 4
- Mask in /proc/PID/status
- 0000000000000010
- Added in Linux
- Original 2.2 set
- Group
- Files and ownership
Normally a write to a setuid file clears the setuid bit, so an attacker cannot patch a setuid binary and keep the privilege. This capability turns that safety off. It also lets you set the setgid bit on a file whose group you are not a member of.
Check a running process with grep Cap /proc/PID/status, or paste the hex into the mask decoder.
Sources
Bit numbers are from linux/capability.h. The list of syscall cards is matched by name from the card text on this site, not from the kernel source. Spot one that's wrong? Tell Rod.