If the suid bit has no effect on directories and the sticky bit has no effect on files, why aren’t they combined into one bit

filespermissions

Would this save one bit per file, or is there necessary padding that has to be used anyways? And even if there is padding, why not still combine them and utilize the extra bit for a new feature?

Best Answer

For historical reasons. The sticky bit was originally used for a completely different purpose: if it was set on an executable file, it told the operating system to retain the text segment in swap. Thus the name "Sticky Bit".

Related Question