Changing Permissions with Terminal and Batchmod

updated Aug. 11, 2008

Batchmod
  is a GUI tool for changing permissions and unlocking files.  It can be installed with Casper or downloaded. You need to be a local admin to run Batchmod.  Note a version for 10.5 only and a version for 10.4 and 10.3

Terminal
It is best to work in Terminal when logged in as a local admin or root.  This is a very basic introduction.

Use the "chown" command to change the owner of a directory or file. 
Example: 
sudo chown -R e123456 /Users/e123456/
This changes the owner of the directory and all of its contents to the user called "e123456"   The "-R" means recursive through the contents of the directory.  "sudo" means "super user do" or run as root.

User the "chmod" command to change the permissions for owner, group and everyone on a directory or file.
Example:
sudo chmod -R 700 /Users/e123456/
This gives RWX (Read, Write, Execute) rights to the owner and no rights to the group or everyone on the directory "e123456" and to all its contents. 
If you use 755 instead of 700, group and everyone will get RX access to the folders and files.


FixHomeDir PermissionsSCRIPT below
This fixes the permissions for user'shome directories.  The AD user must have logged in once forthis to work. 

Login as a local admin, Putthe script in the /Users folder, not in the user's homedirectory. 

In Terminaltype:
sudochmod a+x/Users/fixhomedirperm.sh
thenType:
sudo sh/Users/fixhomedirperm.sh
Thatshould fix it.

Another option.  For 10.5 client computers
Boot to the Mac OS X 10.5 Install DVD and open Utilities Menu > choose Reset Password > Click on Hard Drive > Select User, click Reset button at bottom next to "Reset Home Directory Permissions and ACLs" at the bottom.