3 ms·
ACLs 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 majo
by beagle3 11y ago
ACLs 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.
- beagle3 11y agoCould you describe what the "group" gets eaten by? In most cases I've seen, the group works well as a permission set - e.g. "dialout" is for all users allowed to use the dialer, "lp" for all those allowed to use the printer, "audio" for those allowed to use the speaker, etc. Indeed, some pieces of software insist that the service user actually do everything, which is still supported with this model if the binaries are setuid with +x on owner and group but not other -- although, as you pointed out, auditing tends to suffer in this case. Speaking of which -- what's your favorite auditing setup? I need to set one up soon, I've been using auditd but it feels cumbersome.
- blincoln 11y agoFilter this response based on my being a pen tester, not a Unix/Linux admin - I'm much better at finding vulnerabilities and shortcomings than I am at coming up with a really good solution to them :). That's also why I can't give you a worthwhile answer about an auditing setup - I could tell you which ones I'm not super fond of, but I've never run the auditing side of things on Unix/Linux systems. The challenge I've run into with the group permission is that because there's only the owning group for the file/directory, there are basically two options: 1 - Leave the content owned by the primary group of the service account which also owns the file, and make support staff members of that group. This has the side effect of giving those support personnel access to just about everything else that group can get to, even if they don't need it. 2 - Create a new group that's just for delegating permissions for whatever content needs to be secured, and add both the service account and the users. This is analogous to using the new group as a quasi-ACL, IMO. It works, but quickly leads to group sprawl, and most of the Unix/Linux admins I've worked with are loathe to do it for this reason. A secondary challenge with #2 is that larger organizations will usually have group membership controlled by some sort of administrative team. So getting the group membership changed is a much bigger headache than the filesystem object owner modifying the ACL on their own content.