4 ms·
Ha, I've literally just finished debugging an SSH connection failure which turned-out to be caused by ACLs! An inappropriately-recursive setfacl added addition
by dingaling 11y ago
Ha, I've literally just finished debugging an SSH connection failure which turned-out to be caused by ACLs!
An inappropriately-recursive setfacl added additional read / exec rights to the key files in a user's .ssh directory, which caused SSH to bail-out without establishing a connection. Subtle to find, it was only the "+" suffixed on the ls -al output that gave the clue...
ACLs are very powerful for solving specific problems but as the blog-post points-out they can have all sorts of unexpected side-effects.
- twic 11y agoThe reason their side-effects are unexpected is not that ACLs are intrinsically weird, it's that very few people have familiarity with day-to-day use of ACLs on Unix. The reason that very few people have familiarity with day-to-day use of ACLs on Unix is that very few people use them. The reason that very people use them is because very few people are familiar with them. It's a bit of a Catch-22. For other ways to completely baffle your users, have a play with file attributes: http://linux.die.net/man/1/chattr http://linux.die.net/man/1/chattr
- walshemj 11y agoAre ACL's so new for Linux? I remember using them on Primes back in the 80's
- beagle3 11y agoACLs are, for the most part, unneeded. The old (other, group, user) * (read, write, execute) unix model is much easier to use, and sufficient for the vast majority of uses. Occasionally, there is a need for something that can be expressed by ACLs, but not by Unix permissions. In most deployments, it is so rare that people who are not aware with ACLs just find some other way to do it. ACLs are not the end-all-be-all permission system either. I would really like a permission system that says "in this directory, everyone can create a file, but no one can create an .mp4 or .mp3 or executable file". ACLs can't do that. Some 20 years ago, when I occasionally had to audit file system permissions, Unix ones were usually properly set up (every user has write access to their own stuff, read access to shared stuff, and no access to other's users stuff, with groups used to do exceptions), and NT systems were always a mess, with lots of unexpected permissions and wrongly set up ACLs because complexity. The best setups were always Novell Netware with their "Trustee" security model, which makes it much easier to get what you want than either ACLs or Unix perms
- mjn 11y agoSince he's sysadmin in a university computer-science department (and going by the first paragraph of this post), I think group-type sharing is the specific use-case that the post author might be hypothetically tempted to solve using ACLs. Unix groups work for this but require the sysadmin to be involved every time you want a group created, users added/removed from the group, etc. It'd be nice in some cases if a regular user, say the PI of a project or the instructor of a course, could manage their own sharing permissions, without having to open support tickets every time they need a group created or modified. Conceivably you could hack up a custom solution for this, where certain groups are tagged as "owned" by a user, and the user can run a setuid binary to add/remove members. Or do it via an authenticated web interface or something. Would require some careful design/testing to avoid being a security risk. There are more esoteric possible uses of ACLs this wouldn't solve, like giving certain users append-only permission to some files. But a way for users to manage their own groups would probably handle 90% of the likely uses of ACLs in this setting.
- icebraining 11y agoYou can use sudo for that, by allowing certain commands to be run by the PI, eg.: pi_account ALL= (root) groupadd course_* pi_account ALL= (root) usermod -a -G course_* * This would allow the PI to create groups with a certain prefix, and to add users to it.
- blincoln 11y ago"The old (other, group, user) * (read, write, execute) unix model is [...] sufficient for the vast majority of uses." It's really not, in an even moderately-complex environment. What I've seen most often is that the "user" and "group" permissions get eaten up by other factors (e.g. the "user" is a service account), so the only permission that can meaningfully be altered is "other". The result is that either all of the people who support whatever the app is doing have to be given sudo permissions as the service account (drastically reducing the value of any audit/logging), or access has to be controlled at the OS level in terms of who can log onto the system in the first place. In other words, band-aids to work around the limitations of the traditional Unix filesystem permission model.