Hacker News new | ask | show | jobs
by inetknght 676 days ago
Alas, you're missing some bits. Sticky bit in particular can be associated to each of those too. There's probably others that I don't remember off the top of my head.

> It's counterintuitive that the owner can have less rights than the others

I completely concur. I've also never seen it used in the wild, but I know about it because I stumbled upon it more than once building scripts and not being careful about what flags are set.

2 comments

> Alas, you're missing some bits.

Why "alas"? I'm comparing apples with apples: UNIX base permissions vs alternative-universe base permissions. If you want to add the 3 flags (sticky, setuid and setgid), you can add 3 bits to both sides of the comparison.

>Sticky bit

Interestingly, I have come across some people who confuse the sticky bit with the setuid bit.

It's pretty common for people the misuse the terminology but not the semantics.
I have had some colleagues who did not get the semantics either, for many features of Unix permission bits, not just the two mentioned above.

For example, some did not know how to use the symbolic form of the chmod command's permission flags, e.g., like ug+rx, only the octal ones, like 660, and would typically indiscriminately use 777, not knowing about the security risks :)

...especially when they don't read documentation as often as they should ;)

ahem

Yes, I mean the setuid bit. The bit that makes the groups work for read/write to a directory. The same bit that's dangerous if it's set for a root user or group, and can be iffy if it's executable... yes that bit.