Earlier quoted context omitted.
Depressingly i think sharing computers at least in the western world has become a thing of the past. At the very least, sharing your main form of computing.
?? not all households have money to buy pc for everyone. for phones maybe (also less common outside of rich countries), but definitely not true for pc platform, for most of the world actually.. there a lot of pcs for the family still.
Unix file access rwx permissions are simple but tricky
71–77 of 77 posts
Re: Unix file access rwx permissions are simple but tricky
#72It's counterintuitive that the owner can have less rights than the others. Honestly, I've never seen it put in practice in any real-world file system. Incidentally, this is also not very efficient: UNIX permissions as they are today require 9 bits, namely rwx for owner, rwx for group, and rwx for others. But in an alternative universe where owner's rights win over group's rights which win over others' rights, permiss…
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 fl…
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.
Re: Unix file access rwx permissions are simple but tricky
#73Earlier quoted context omitted.
It probably is fine. Still makes my spider sense tingle about some unforeseen failure that will crop up one day.
I've seen scripts with hardcoded "/home/$username" so your worries aren't entirely unfounded. It's understandable too, because Linux doesn't provide a nice way to retrieve that information. You'll have to parse /etc/passwd (which might not contain all users) or hope that whatever language you're using supports path extrapolations so that you can do realpath(~username) or call a third party tool that does, like a shel…
Re: Unix file access rwx permissions are simple but tricky
#74Earlier quoted context omitted.
Those multiple users could be used to implement sandboxing. And of course if one has a family then one might want accounts for Mom, Dad, Alice and Bob.
Yea, I'd like to see a system where each application runs as its own user, especially third party applications not vetted by the OS vendor, the package manager and so on. Maybe this already exists--I think it would be a good step forward for security and privacy. You can no longer trust 3rd party applications to stay in their lanes. Running an application with full access to everything that I as a user have access to…
Re: Unix file access rwx permissions are simple but tricky
#75Earlier quoted context omitted.
It probably is fine. Still makes my spider sense tingle about some unforeseen failure that will crop up one day.
I've seen scripts with hardcoded "/home/$username" so your worries aren't entirely unfounded. It's understandable too, because Linux doesn't provide a nice way to retrieve that information. You'll have to parse /etc/passwd (which might not contain all users) or hope that whatever language you're using supports path extrapolations so that you can do realpath(~username) or call a third party tool that does, like a shel…
Re: Unix file access rwx permissions are simple but tricky
#76Earlier quoted context omitted.
It took me a shockingly long amount of time before I realized it was silly to have a username on my machines. I am the only person using this, why am I typing unnecessary cruft? Username switched to “root” on all my machines and I remove the username from PS1. /root is shorter than /home/a (:
That requires faith in software not making hard coded assumptions about filesystem structure. Something which I am not prepared to do. How much software still cannot respect XDG?
Re: Unix file access rwx permissions are simple but tricky
#77Earlier quoted context omitted.
>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.
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 :)