So today I want to look at how to do a permissions repair thought Single User Mode.
Heres the code.
fsck /mount -uw /
/usr/libexec/register_mach_bootstrap_servers /etc/mach_init.d
/sbin/SystemStarter start SecurityServer
diskutil repairPermissions /
To start you want to boot into Single User Mode by holding Command + S after the gong. Once the computer has booted you will start with fsck /. This will check the file system to make sure it was properly unmounted and is ready to be mounted again.
Next you will use mount -uw /. mount is the command used to mount the hard drive, which allows for you to use the hard drive. The option -u basically changes the files system to read-write or to read-only depending on what its currently set at. Option -w mounts the drive as a read/write files system. The combination allows you to have read/write access to the drive you are mounting, which brings us to /. / is the location of the drive that you wish to mount, which in most cases is you main Mac hard drive. / is the root of the drive so you are mounting the whole drive and not just a folder in the drive.
After that you will use /usr/libexec/register_mach_bootstrap_servers /etc/mach_init.d. Here you are starting some services to allow you to run the necessary tools. mach_init.d is responsible for many programs, such as networking, directory services, disk arbitration, and so on.
Next you use /sbin/SystemStarter start SecurityServer. This starts more of the system, more networking items and some other items that would be in StartupItems. It gets the rest of the system before Aqua up and running so that you can run the commands you need.
The final command is the meat of what we are trying to do here. diskutil repairPermissions is how to repair your permissions thought the command line. If you are at the computer and its running or you can SSH into the machine or are running ARD and can send UNIX commands this is all you need.
As usually let me know if you have any questions about this or anything else I can write on. Maybe one of these days I will write a none techie article.