Skip to content Accesskey=4Skip to sub-navigation Accesskey=3View our Accessibility Options MIT Information Systems Home About IS&T Contact IS&T Site Map Search Advanced Search
Getting StartedGetting Services by Topic or Alphabetically Getting Help

On This Page

[Help]

  

Quick Links

Top Level

Related Links

Ask OLC a question

Athena Consulting Homepage

Helpdesk Stock Answers (for Mac/PC questions)


Changing AFS permissions for SUBDIRECTORIES of a DIRECTORY

Setting AFS permissions in a directory using "fs sa" will not
automatically change the permissions in the subdirectories that
already exist in that directory.  If you want to change the
permissions in all of the subdirectories as well, you have two options:

1) The easiest method is to use the "fsr" command in the consult
locker.  This command is a wrapper around the "fs" command and takes
the same arguments, but will change permissions in a given directory
and all its subdirectories.  

For example:

	To give a user permissions on one directory (but not its
	subdirectories) you would do:

   	athena% fs sa directoryname username permissions
	
	like so:
   	athena% fs sa ~/www joeuser write

To set the permissions recursively, you'd simply replace "fs" with
"fsr".  You will need to have the consult locker "added" already:

	athena% add consult
	athena fsr sa ~/www joeuser write

As is the case any time you change AFS permissions, you should inspect
the end result with "fs la" to ensure that the permissions are set as
you intended.

2) The other option is to use the the "find" command, which traverses
a directory structure and finds all the things that match. 

If you wanted to give the user permissions in a directory and all its
subdirectories, you would do:

   athena% find dirname -type d -exec fs sa {} username permission \;
like so:
   athena% find ~/www -type d -exec fs sa {} joeuser write \;


(In English, that would be "Find everything in the www directory that
is of type "d", that is, also a directory, and then execute the
following "fs sa" command on it, filling in the directories you've
found in place of the {}s")

Similarly, if you wanted to give permissions to a group instead, you
would do something like

   athena% find ~/MySecretFiles -type d -exec fs sa {} system:myfriends read \;

For more in-depth explanation of AFS permissions themselves, see the
OLC stock answer on "Changing AFS permissions."

MIT Home | Getting Started | Getting Services | Getting Help | About IS&T | Accessibility
Ask a technology question or send a comment about this web page.