The book she mentions, "The Linux Programming Interface," sounds pretty useful, but it's seven years old at this point. Does anyone know how much has changed or if there's a new version coming any time soon? Seems like it's worth $70 but the age has me concerned. I'm sure the basics, like the things this article is about, haven't changed, but I bet all the stuff around cgroups would be useful for how setgid works wit…
How do groups work on Linux?
51–60 of 68 posts
Re: How do groups work on Linux?
#52Earlier quoted context omitted.
So why did you mentation "Ext2/3/4 and XFS" if filesystem doesn't matter?
I don't see what you don't understand. I demonstrated that on FreeBSD created file inherits the group of its parent directory even without SGID, i.e. that FreeBSD exhibits BSD semantics. I also added that if you can have BSD semantics on Ext2/3/4 and XFS if you mount them under Linux with appropriate options.
Now, IMO asking someone if they understand what the difference is between chmod VS chmod is and why it exists is a bit more telling, because this touches down on what interface most unix filesystems try to present and also how they’re implemented to a degree.
The specifics on any given system are just a manpage away but the general understanding only really comes from having absorbed some actual unix interactions.
And certainly knowing more than just Linux should get one bonus points...
Re: How do groups work on Linux?
#53Earlier quoted context omitted.
I use this as a basic indicator of someone's Unix competency. Not as a straight binary thing, but if I'm talking to someone (interviewing or maybe debugging something) I've found that if you know about setgid/setuid you have probably been interested enough to know what you are doing.
I've worked around this without knowing about setgid ... It's funny how easily I suffer tiny papercuts that way, it should be obvious "there's a better way".
Re: How do groups work on Linux?
#54The book she mentions, "The Linux Programming Interface," sounds pretty useful, but it's seven years old at this point. Does anyone know how much has changed or if there's a new version coming any time soon? Seems like it's worth $70 but the age has me concerned. I'm sure the basics, like the things this article is about, haven't changed, but I bet all the stuff around cgroups would be useful for how setgid works wit…
Re: How do groups work on Linux?
#55Earlier quoted context omitted.
explain?
shabble@host:~$ cp /bin/chmod /tmp/chmoo shabble@host:~$ chmod 600 /tmp/chmoo shabble@host:~$ ll /tmp/ch* -rw------- 1 shabble shabble 59K Nov 21 17:15 /tmp/chmoo shabble@host:~$ /tmp/chmoo -bash: /tmp/chmoo: Permission denied shabble@host:~$ /lib64/ld-linux-x86-64.so.2 /tmp/chmoo /tmp/chmoo: missing operand Try '/tmp/chmoo --help' for more information.
Re: How do groups work on Linux?
#56Earlier quoted context omitted.
I'm not sure what you aren't understanding. Directories are just a type of file, so that's not wrong, the dir/file is owned by the `awesome` group, and the group permissions are `r--` so the group can indeed read it.
Or one could apply Occam's razor and admit that "d" was a typo.
Re: How do groups work on Linux?
#57Regarding setuid, this is why when you run programs like ping(8) it doesn't require root access to open a raw socket. ping's setuid is set so upon execution it executes as root since ping is owned by root and then calls setuid(getuid()) to run as the intended user.
Re: How do groups work on Linux?
#58Some highlighted words do not appear using Firefox 57 on my Ubuntu 16.04.3, like the word "julia" at the third line. It's OK with Chromium. EDIT: Seems a Firefox related bug, i noticed this strange behavior with other websites inc. Stack Overflow since then. Will investigate asap.
Re: How do groups work on Linux?
#59Earlier quoted context omitted.
explain?
I'm a little surprised some smartypants hasn't come along and added a check to ld to prevent this from working, probably for "security" reasons. I've known about this trick for a long time, but I've always thought its days were numbered. Another way to solve the problem: scp unfuckedhost:/bin/chmod . ./chmod (stuff)
Re: How do groups work on Linux?
#60Also "newgrp" can be used for join "new" groups without re-login.
And here I've been using `su - $ME` all this time. Thanks!