Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Protect pre-OS X files and folders System
I wanted to restrict other users' access to folders that existed prior to my upgrade to OS X, like the subfolders in my home folder.

Files and folders that were on the hard disk prior to upgrading to OS X are not assigned to a user or group. They take on ownership by whatever user is logged in. Using the Finder: Show Info to change the Privileges does not work. Any user logging in is listed as the owner with rw, r, r privledges. Group is usually "unknown."

To restrict access, you can log in as the user you want to own the files and copy them. Then delete the original. A faster method can be done via Terminal using "chown". You must sudo to use this command:
sudo chown [user shortname] filename
I did this to a folder and, voila, logging in as a different user I couldn't open the folder and got the "do not enter" folder icon.

For neatness' sake, you can also change the group [Editor: chown username:group filename]. The group is usually "Staff", but check out an existing file's privileges first.

I think an option for chown will change all files below "filename" but I haven't tried it. [Editor: use the "-R" option on chown]
  • Currently 1.00 / 5
  You rated: 1 / 5 (2 votes cast)

Protect pre-OS X files and folders | 2 comments | Create New Account
Click here to return to the 'Protect pre-OS X files and folders' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
use batchmod
Authored by: loren_ryter on Dec 02, '01 12:14:20AM

nice freeware utility, doesn't use the command line. very slick.

[ Reply to This | # ]
chown -R
Authored by: syth on Dec 02, '01 02:48:51AM
If you use chown -R user:group dir then the directory and all it's contents will be changed to the user (and group) you specify.

[ Reply to This | # ]