14 Comments

Summary:

We all love our Macs, and most of the time, they love us back. But occasionally, programs start crashing, or the spinning-pinwheel-of-death becomes a common sight. In these situations, there are a few steps you can take to try and remedy the problem. Today, we will […]

We all love our Macs, and most of the time, they love us back. But occasionally, programs start crashing, or the spinning-pinwheel-of-death becomes a common sight. In these situations, there are a few steps you can take to try and remedy the problem. Today, we will be looking at repairing damaged file permissions.

What are permissions?

Permissions are file and folder settings that OS X uses to determine who can access and manipulate files. The purpose of permissions is to prevent unauthorized users and programs from damaging to changing system or user files. Think of permissions as the OS X bouncer. There are three basic kinds of permissions; read, write, and execute. Read and write are pretty much self explanatory, but execute is a different story. Depending on weather the file is and executable (a script of program) or a folder, execute determines weather the file can be run (if it is executable), or searched (if it is a folder). By default, there are three types of entities that exist as users in OS X; owner, group, and others. Owner is you, and by default, you have access to all of your files and folders. If you are a system administrator, you have access to all files on the computer, including those of other users. Group is just what it sounds like, a group of users. Users can be placed in a group, and the group given access to files, thus giving the user access by proxy. Group is handy when dealing with situations in which many users exist, of which you want some to have more or less access to files. Only administrators can create and change groups.

Why do we care?

All that technical stuff is well and good, but as a user, we don’t have to deal with them face to face very often. So why should we care about who and what can access files, other than from a security standpoint? Well, users are not the only ones trying to access files; applications need to read and write files as well. During the course of running any given application, tens or hundreds of files may be accessed, executed, and written by the program. No software is perfect, and during normal operation of your computer, errors may occur when writing permissions of files. These errors may make it impossible for a program to access a file it needs to run. But what happens when something goes wrong with the permissions of a file that an application needs to access? Program crashes, and other finicky behavior. Many times, if a program is doing weird things, or crashing often, one or two files with bad permissions could be to blame. In simple terms, think of it like being given a task from your boss that requires access to the Johnson account, but when you go to file room, the secretary tells you that you can’t see the Johnson account. You can’t get the information you need, and thus, can not complete your task.

How do we fix them?

There are more than a few ways to fix bad system permissions. The most common way to fix permissions is by using the Disk Utility. Go into your Applications > Utilities folder, and open Disk Utility. Select the drive you want to repair from the list on the left. If you have more than a single partition on a single drive, select the partition you want to repair. Click on the First Aid tab, which should be selected by default. Now click “Repair Disk Permissions.” OS X will do its thing, and you will see “Repair Complete” when your permissions have been repaired. This will repair your User and Application files, which are usually what cause problems with program crashes.

Another, arguably simpler way to repair your permissions is to open up the system Terminal (by going to Applications > Utilities), and typing:

sudo diskutil repairPermissions /

You will be prompted for the system administrator password. Once you have entered the password, you will see your permissions being repaired. Once the repair is finished, you will be returned to the command prompt. This does the same thing as running disk utility, only it fixes permissions on the entire disk, and without the graphical interface.

One can also use a system utility such as Cocktail or Onyx to repair permissions as well as perform other system tasks.

Some Final Notes

I like to repair my permissions at least once a month, just to make sure that my system is in tip-top shape. If you have any questions, comment on this post, and I will try to answer them. Stay tuned to The Apple Blog for “Troubleshooting Tips 2: Repairing a Damaged Disk,” coming soon.

You’re subscribed! If you like, you can update your settings

  1. Repairing permissions is pretty much a waste of time. From my own experience it is worthless as a problem correcting measure since most of the time if the permissions have been corrupted then the file is most likely is corrupt as well. To learn what repairing permissions really does (besides wasting your time) I suggest you read this post.

  2. Hey now,
    I’ve had permissions repair save my ass more than once.

  3. Clint Ecker Sunday, June 26, 2005

    Repairing Permissions is Useless. Rosyna at Unsanity explains why repairing the permissions on your computer is a complete placebo 99.9% of the time.

  4. Yes… thank you.. Twist already posted that particular link.

  5. Chris Lawson Sunday, June 26, 2005

    No, really, repairing permissions is useless unless you have a problem you’re pretty sure is permission-related.

    cl

  6. I can now see that Rosyna is a brilliant software engineer, but that’s as far as it goes. Declaring that repair permissions and zapping PRAM are useless it sheer idiocy.

  7. Rich Trouton Monday, June 27, 2005

    One great thing about repairing permissions is that you can automate this via cron, if you never want to deal with it. I have my system set up with a repair permissions shell script tucked into my daily crontab, so every morning my Mac (and the other Macs I manage) have their permissions repaired every morning at 3:30AM. Since my team’s done this, we haven’t run into many permission issues.

  8. Yawn. Repairing permissions is not useless. It’s fixed major problems for me more than once. Does it fix everything? No.

    But the author of “repairing permissions is useless” is basically claiming that becuase he’s never had a problem that repairing permissions fixed, they must not really exist.

    Well, you know, I’ve never seen a great white shark in person, either, but I’m pretty confident they exist.

    It’s not a placebo. I’ve fixed major things wrong with OSX (for example, an iBook’s CD drive not working) by repairing permissions.

    So anyone who thinks that repairing permissions is useless is just wrong.

  9. I have had to fix a computer with major permission related problems in the past and repairing permissions didn’t help any. The problem was with the users files in their iTunes and iPhoto libraries.

  10. I’ve repaired permissions and had good results with it. However, I usually run Onyx instead, since it does a multiplicity of things. I have never run the “optimize disk” routine tho.

    My questions is this….
    I have admin permissions and the user has everything but admin. Should I run repair permission from the admin side or does it matter?

Comments have been disabled for this post