change permissions to all files at once

mickeylou

Registered
i have a bunch of old files and folders i copied from old external HD into my new Mini (OSX 10.5.6). now many of them don't have me set as the User. how do I change permissions for EVERYTHING to make me the User?
 
You can do a Get Info on the drive, and set the permissions you want and then click on the button next to the '-' and select apply to all enclosed items. You may need to login as root to be able to do this.

An alternative, and this carries a big warning,is to go through the Terminal. cd to the top level of the disk which is usually /Volumes/<volume name> and type the following :

chmod -R 777 * followed by Return and enter your admin password when prompted.

I must stress that you must make sure you are at the TOP LEVEL of the Volume or folder whose permissions you want to change as this will give read/write and execute permissions to everyone on that folder and all sub-folders and files.
 
chmod -R 777 * followed by Return and enter your admin password when prompted.

Careful there. That will set the permissions on the files to allow full read/write access to ALL users, which is probably not what you want.

To change the owner of the files you should use the chown command instead. Something like this should work (not that I've tested it!):
Code:
sudo chown -R mickeylou /path/to/folder
(Where "mickeylou" is the name of an OS X user account.)

That will leave the permissions intact, so if you had files set to deny read or write access to a group or other users, that will still apply.
 
i found an non-scripting run-around. copy affected files to Sharing folder, then drag them to HD. all locked permissions assigned to me as User.
 
In your Applications folder, go to Utilities, then open Terminal. Type this: "chown -R mickeylou" (again, substitute your OS X user name for "mickeylou", then a space, then drag the files/folders whose permissions you want to change from the Finder onto the Terminal window. The result should look something like this:
Code:
chown -R mickeylou /Users/mickeylou/Desktop/some_folder
Then hit Return. There is no way to undo this! So unless you're really, really sure this is a good idea, make backups.

Tommo's first suggestion, using the Finder's Get Info window, is probably simpler. Looks like they changed it a little in Leopard, though, so I'm not sure exactly how to do what you need to do that way. Maybe someone else can answer that.

Edit: Nice solution, Mickey!
 
okay, thanks boys! until I'm certain, i may just stick with the Sharing folder option. but I'll keep this script for future use when I'm feeling cocky.
 
Back
Top