Fixing permissions on shared directories

Fixing permissions on shared directories

As described in the page on sharing a directory, the easiest way to share files among a group of people is through the use of a netgroup and careful attention to the settings of groups and permissions. It is possible by setting the setgid bit on directories and properly setting your umask to have the right protections set almost automatically while you are working with shared files, but sometimes people forget.

If someone you are sharing files/directories with fails to set the permissions right, there are two ways to get those permissions fixed: either have them fix the permissions themselves or appeal to staff with privileges to change them for you. Unfortunately, the policy regarding this on the faculty and research machines administered by LCSR is that filesystem protections must be respected. Any changes in permissions or circumventing of filesystem protection must be approved by the department's Executive Committee. As this can take some time, it's most advisable to have people fix the permissions themselves if at all possible.

Fixing the permissions on files you own

Finding and fixing broken permissions can be a tedious affair. I have written a script which can do this for you:
    ~watrous/fix-group-access [-v|-d|-rw] <directory>
where <directory> is the directory under which all files and other directories should be shared. "-v", (verbose) if specified, will report on the steps being taken. "-d", (debug) if specified, will cause the commands to fix permissions to be printed to the screen rather than being executed. "-rw", (read/wrote) if specified, will cause the commands to fix permissions to be printed to the screen rather than being executed.

Appealing to the Executive Committee

If it is impossible to contact the owners of the files to which you need access, send a message to help@cs and we'll try to get the wheels turning in this regard. Be warned: the process could take weeks.
This page last updated January 6, 2010.