Hack #52. Share Files Using Linux Groups
Traditional Unix/Linux groups have always made it easy to share files among users.
Though this is more of a basic system capability than a hack, creating files that other users can both read and write can be done in various ways. The easiest way to do this is to make all files and directories readable and writable by all users, which is the security equivalent of putting a sign on your computer reading, "Please screw this up." No sysadmin in his right mind would do this, and most would also want to protect their users against accidentally setting themselves up for a catastrophe by doing so.
This hack provides an overview of how to use Linux protections to create directories that can be protected at the group level, but in which all members of that group will be able to read and write files. This doesn't involve any special scripts or software packages, but provides a simple refresher that will help you help your users get their work done as efficiently as possible— and with as few phone calls or pages to you as possible.
Linux Protections 101
Basic Linux protection modes, inherited from Unix, provide the ability to protect files and directories at three basic levels:
Owner-specific permissions that control what the person who owns a file can do
Group-specific permissions that control what other members of the group that owns a file or directory can do
One more set of permissions that control what anyone else on the system can do
These permissions ...
Get Linux Server Hacks, Volume Two now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.