4 ms·
Nitpick, but file permissions in Linux take normally 12 bits. You probably did not count SUID, SGID and sticky bit.
by kukx 7y ago
Nitpick, but file permissions in Linux take normally 12 bits. You probably did not count SUID, SGID and sticky bit.
- Const-me 7y agoI’ve only counted these famous RWX bits, settable by chmod. You’re right, there’s more security metadata involved in Linux. Still, Windows permissions are way more complicated, especially when AD domains are involved. These access control lists have arbitrary count of entries each. There’s another list, SACL, for audit. Access permissions are inherited through file system with non-trivial inheritance rules, e.g. allow + deny = deny. User permissions are inherited through group membership, and security groups can be nested i.e. include other groups. Security descriptors may include custom permissions unknown to MS. Any thread can run as any user in the forest through client impersonation, many network servers do. The kernel tries to apply effective permissions instantly, as soon as anything changes (but not for every read/write, that would be too slow, it only does access checks when opening files). Combined, these features make access checks way more expensive in Windows, by orders of magnitude.
- fanf2 7y agoOr the ACLs or extended attributes https://linux.die.net/man/1/chattr https://linux.die.net/man/1/chattr https://linux.die.net/man/1/setfacl https://linux.die.net/man/1/setfacl