• location: Austin, TX
  • currently: would give his left foot for an Aeron or Freedom chair right now...   more tweets...
  • now playing: Brendon Bushman – SaferPregnancy Concept 01 Theme A (music only)

Weblog

 

11.08.07

comments(0)

Leopard Permissions issue

This is documented elsewhere, but since it took me a little bit of work to find a workable solution, and the chosen solution for me amongst many comments in various Apple Discussions threads, I thought I'd put a mention here.

The Issue:

For certain folders within my personal user folder, most notable my users sites folder (~/Sites) and various subfolders thereof, I no longer could save over my files. Coda offered me the option of authenticating with my admin password or replacing the files; finder mostly wouldn't allow me to rename or otherwise alter these files, short of deleting and replacing.

A quick trip to "get info" revealed that while I was the rightful owner of these files, the GROUP was set to "unknown" and had read-only access (sorry, I didn't have the foresight to take a screenshot before I fixed the problem). "Everyone" was set to have write access, but that part didn't seem to matter. From prior experience in Tiger, generally files of this nature are assigned to the group "staff", and would have write privileges. A solution after the jump...

The Solution:

DISCLAIMER: This solution is based on reading various Apple forums, my positive experience using it on my machine, and a very basic knowledge of related topics. I am sharing it because it worked for me, and until Apple either releases a fix or posts a technote on it, I consider the more reference and anecdotal support of this solution to be of use. However: Use at your own risk. I cannot be liable or otherwise responsible if you hose your system in the process. Also, while comments to share your results are fine, I am largely unqualified to help if you are merely unsuccessful, or somehow successful in the aforementioned hosing. Thank you for your understanding.

Addendum: Also, to be clear: there is ONLY a need to follow this procedure IF you have experienced the issue described above. From what I can tell, many folks have done new, archived, or upgraded installations of Mac OS X 10.5 without running into this problem.

"Repair Permissions!" you might cry. But AFAIK, the Apple repair permissions script isn't quite so detail oriented - it mostly checks up on system-owned files to make sure everything is well, but doesn't meddle too much in your stuff. I tried anyway, but no change.

So, from the various forum posts by those whose geek-fu is much stronger than mine, the consensus was that the goal would be to fix any-and-all files in your user folder wherein you are the owner, but for with the group is set to unknown- which, thanks to the glory of the command line, can be done in one shot. :)

Fire up Terminal (/Applications/Utilities/Terminal), and change the directory to the main "Users" folder. At the prompt, type this:

cd /Users

Now, to reset the "group" permissions for all files that match your user, type the following, replacing "yourusername" with the short version of your username. Not sure what your short username is? Just check what your user folder is called.

sudo chown -R yourusername:staff yourusername

(warning: make sure you type this correctly, and have moved into the Users directory first. That -R flag means recursive, and will perform that actual to all files in its wake; used inapporpriately, this can result in definite unhappiness.)

That's it! I recommend logging out and back in afterward to make sure everything is updated in the finder, and you can double check by doing a "get info" on one of your previously offending directories or files - it should now list "staff" for the group, and you should be able to edit the file(s) to your hearts content.

Cheers!

Resources:

Not sure about this? Read more and evaluate for yourself:

(file under: , , , , , )


Share your Thoughts!


Recently Read (via del.icio.us)