43 Comments
- awhiteflame, on 10/12/2007, -0/+6Well. It's obviously only going to work if the file permissions are *actually* the problem.
Now,
chmod -x /Applications/Utilities/Disk Utility.app/Contents/MacOS/Disk Utility
chmod -x /bin/chmod
*That* would be interesting. - vonnie, on 10/12/2007, -0/+5Don't do it.
(there, now someone told you not to do it) - repruhsent, on 10/12/2007, -0/+4This might seem slightly unrelated but I think it will give you some insight into the mind of a typical Mac user. About a year ago I bought an iMac at a local Apple Store. About two weeks or so later, the system wouldn't boot, and the hard drive made an audible clicking noise. This of course means there's a mechanical problem with the hard drive, right? Well, since the machine was under warranty I called Apple about the problem hoping they would give me a new machine. The guy on the tech support line told me to repair disk permissions and that this should fix the problem.
So, as you can see, it's not really that repairing disk permissions fixes anything - Apple just has its users and tech support people brainwashed into thinking that it could fix most anything. - maverick_swl, on 10/12/2007, -0/+3Ignorant...
- vonnie, on 10/12/2007, -0/+3Don't repair permissions. Simple as that. It is simply so rarely needed that you can just as well forget about it.
I'm sorry, but if *unsanity* says that repairing permissions is pretty much voodoo, if daringfireball says the same thing, then I think I'll just believe them. I think that mac developers have more knowledge about these kinds of things than some columnist. - Matadon, on 10/12/2007, -1/+4Not really *that* interesting:
--
sudo /bin/sh
cp -p /bin/ls /bin/newchmod
cp /bin/chmod /bin/newchmod
ls -l /bin/newchmod
-r-xr-xr-x 1 root root 32460 Mar 21 2005 /bin/newchmod
---
As long as you keep your head, and the root shell, it's possible to fix almost anything under Unix. :)
You could also write a Perl script that could chmod the file (Perl uses the syscall, not the shell command), or a C program, or install(1), or...the list of ways to fix these sorts of minor screwups is pretty endless. - AaronD12, on 10/12/2007, -0/+3@Vonnie: This problem happened for MONTHS, not just over the past weeks. All my other Macs were syncing their iDisks just fine, just not the Mini.
A repair of permissions solved the problem, not a network or .Mac issue. - vonnie, on 10/12/2007, -1/+4Update runs with root privileges and ignores any permissions. So no, repairing permissions is *NOT* necessary before an update, and an update won't go 'awry' because of permissions of the files that needs to be updated.
- reiggin, on 10/12/2007, -0/+2$ diskutil repairPermissions /
- Matadon, on 10/12/2007, -0/+2Having been a UNIX sysadmin for a number of years, I can't see why 'reparing permissions' would be particularly useful in most (normal) circumstances.
Granted, if the utility can fix permissions for every important system file, then it is pretty useful; I've had assistants[1] who decided that 'chmod -R 644 /' was a good idea, and needless to say I would have been much happier not having to make them fix it[2].
[1] Thankfully, I read about this one on the 'Unix Sysadmin Horror Stories' thread, and since then have been VERY careful with ANY recursive command. Now, accidentally trashing /usr/bin/X11R6 with an errant 'cp', that one *was* my fault...
[2] Yes, we had backups, but they run at midnight, and this happened on a customer's box at 6pm, and said customer had spent a day importing data into their app; a backup would have restored nothing but a pristine database. Good thing I stopped my assistant before he just wiped to restore from backup... - philsherry, on 10/12/2007, -1/+3Agreed. Most people don't have a clue what they're doing when they advise someone to repair permissions for every little problem.
- uncleFester, on 10/12/2007, -0/+2"Other Unix systems (Linux comes to mind, Solaris is another - although I don't have much Solaris experience so I might be wrong) don't have this problem with repairing permissions."
oh yeah?
as root, do a 'cd /usr/sbin; chown nobody:nobody *' and let me know how you end up. :) i expect things like suid commands no longer work. or 'chmod 644 /usr/bin/login' (or wherever your login/telnetd is) and see how well telnets into the box work at that point.
myself, a util to fix/reset perms on ANY unix would be useful to fix an admin FUBAR moment*.. but if 'repair perms' on osx is causing this much commotion, i think i have to be missing something else it may or may not do (besides simply reset ownership/perms).
-r
*luckily, not one of MY moments.. but a coworker did it once in an oops moment and it could have been worse.. - AaronD12, on 10/12/2007, -2/+4I solved a problem that was occuring with my Mac Mini (G4, 1.33GHz) right out of the box -- it would not connect to my iDisk.
Repairing permissions fixed the problem.
Just my 2ยข... - smedstadc, on 10/12/2007, -1/+3"I cannot abide useless people."
...
Firefly? Anyone... Anyone? That show was full of good advice. - starmanjones, on 10/12/2007, -1/+2I have never had a problem using repair permissions. i do this stuff as a profession and i can tell you for sure the single biggest reason i whack linux server is after a few years the permissions get screwed up and the box becomes unsecure or things start to not work. it shouldn't be that way but it is. while it should be easy enough to go through systematically and fix them... it often just makes it worse... because humans are just like that...
so, i actually like this... its never hurt a thing. - platypibri, on 10/12/2007, -1/+2@ WiseWeasel
Funny, the article says specifically that you really DON'T need to repair permissions before an OS X update. The author's reasoning is that when you run an apple update you authenticate the machine, the updater has root access, and it can modify anything it has to, regardless of permissions.
I'm wondering what the argument is for your position that it is especially important.
I'm asking because I'm a hit and miss permissions repairer at best, and I have very few problems with my machine. - fanboydcs, on 10/12/2007, -1/+2Most important thing to check for on a mac is the file system. Do a disk repair in disk utility (which is the same as a fsck) and it will fix ALOT of issues...
- vonnie, on 10/12/2007, -0/+1@CedanticPunt
There is a difference between running a process with root privileges, and being able to log in as the root user. Check your running processes, lots of daemons running as root. The admin user is able to start a new process with root privileges.
If you run softwareupdate -i -a in the terminal, it tells you you have to run it with root privileges. (sudo softwareupdate -i -a) - jayhawk, on 10/12/2007, -2/+3onyx -- http://www.versiontracker.com/dyn/moreinfo/macosx/20070 is a freeware app that i have used for quite a while. it's free, but does much with regard to system maintenance and it also repairs permissions with the click of a button. just fyi.
- samdu, on 10/12/2007, -1/+2It's probably used too often (like defragging in Windows), but it does actually serve a purpose if permissions are a problem. I had to repair the file permissions after installing an Epson printer driver, but I did do a "check permissions" first and it came back with problems on the permissions on those files. So, it's not a panacea, but it IS useful.
- Zorkon, on 10/12/2007, -1/+2Did you read the article at all?
The reasons given for the presence of the Repair Permissions options mostly dealt with dumb users or dumb software that changed OS permissions. The same problems exist on normal Unix systems. As another poster has pointed out, there's nothing worse than junior sysadmins and the power of chmod. :)
There is only one Mac-specific reason for Repair Permissions; Macs capable of dual-booting into OS 9 (or running OS 9 apps via Classic) needed this functionality because OS 9 did not understand Unix permissions and would often mess with the filesystem. This problem is going away since none of the new Intel Macs are capable of running OS 9 these days anyways. - cmiz, on 10/12/2007, -0/+1I think the main difference is that people who write applications for linux and unix are generally very aware of system permissions, and even if they aren't, the people testing the programs will be. I've only needed to use repair permissions once before because installing an application had somehow set my optical drive to only be accessible by root. Why/how would an application do that? I have no idea... but that's what it did. Fixing the permissions on the mount point brought it back to normal.
It's very rare that it is useful, but it's very useful in those rare situations. Oh, and yes... the apple 'geniuses' overuse it to a flaw. "What? Your processor is on fire? Ok, you're going to need to open disk utilitiy..." - CedanticPunt, on 10/12/2007, -1/+2"Update runs with root privileges"
Are you sure? Normally you just give it the username and password of an administrative user, but not root, which is something else. The root account is disabled by default on OS X.
If it runs as an admin user then it can be sensitive to permissions as that user doesn't have read/write permissions on all files/folders. - uncleFester, on 10/12/2007, -0/+1likewise, i'm a long-time unixadmin (for fun and profit) and i'm not sure i fully understand the hubbub over 'repair permissions' (having only messed with osx off and on.. so i have dabbled but am not a daily user or something like that)...
a) being unix-y or unix-based, aren't we really only talking about chown/chgrp/chmod?
b) and if files have a set perm it should have, i presume there's a list of perms for certain files/dirs?
c) .. and if this is so, how could it really harm to do this now and again? (besides uselessly consuming cpu/disk usage)?
d) .. and if this stuff is so critical, why doesn't apple have something like an irix/linux-y inotify in place to watch perms alterations?
.. or is it that 'repair permissions' as an answer is simply a panacea with no real benefit in (x)% of cases it's suggested?
hell, if i had a master list of recommended perms for files to save my a$$ whenever some dope has a chmod/chown run wild.. i'd love it. :) (luckily, it's a rare concern where i work but it has happened once or twice.. and luckily, only on dev boxes).
-r - funkytaco, on 10/12/2007, -0/+1I think you are mistaken in blaming the OS. You probably have a failing drive. I work in a data center, and drives that file have alot more problems. It is not an OS issue. The same thing would happen in any OS, even in Windows. If you have to file check frequently, you had better back up your data.
- vonnie, on 10/12/2007, -0/+1I guess not many diggers belive me when I say that repairing permissions hurt the security of your osx systems. When I run 'verify permissions', I get among others this line:
"Permissions differ on ./Library, should be drwxrwxr-t , they are drwxrwxr-x"
Having the sticky bit set on /Library is just a bad idea. The new permissions are better than the permissions that are suggested by disk utility. You don't want any user to be able to add files to the global Library folder. Imagine any user creating a LaunchDaemons directory with his files in /Library, or creating an InputManagers directory with his plugins. He would get root access pretty quickly.
Like already stated, the new permissions are not always wrong because disk utility says so. The new ones can be more secure or more convenient. - mancat, on 10/12/2007, -0/+1SFC does not check any filesystem permissions, it simply examines the current set of installed system files for validity by comparing them to the set installed in the "Dllcache" folder used by Windows File Protection.
- Matadon, on 10/12/2007, -0/+0@repruhsent:
Point.
@uncleFester:
I switched around the end of last year, at least for my primary desktop; my last job bought me a new computer as a 'thank you' for saving them like $40K in equipment costs (very small startup, so this was a biiiig chunk of change to them). Overall, OS X acts like a real Unix for the most part, although it took a few weeks to get used to using this 'System Preferences' thing, as opposed to just editing files in /etc.
But, yeah, permissions work pretty much the same way on OS X that they work everywhere else, and 'Repair Permissions' is about as useless as it sounds from what I can see.
As far as a way to save permissions, I actually wrote a pair of C programs, one to scan (and store) permissions of the important directories under root, and the other to look at that file and restore said permissions, only because I seem to have a knack of hiring people who 'misunderestimate' the power of -R.
Of course, it's all useless now, because I'm enjoying a year of not working and going back to finish up the whopping four classes I need to get my BA...and my school is pretty much Windows-only, so they have little use for me. - danfrakes, on 10/12/2007, -0/+0@vonnie
You didn't even read the article, did you? ;-)
-some columnist - Kruncher, on 10/12/2007, -1/+1I sorta RTFA, but is this like windows SFC utility? Why doesn't linux have a utility like this? Does it even need it?
- vonnie, on 10/12/2007, -2/+2Killing a chicken and use the blood to paint your ethernet cable would have helped too. iDisk was probably just down temporarly. Only thing you can do is wait.
There are all sorts of problems reported with .mac the latest couple of weeks. Nothing to do with permissions. - brianmost, on 10/12/2007, -2/+2There's also a "Verify Disk Permissions" button in Disk Utility (pick a drive, then the "First Aid" tab). Using this option will show you all permissions that would change, but won't make the actual changes.
It's worth a look-see. Tiger updates seem to have tightened up access on things like secure.log while loosening up access on some documentation, so you could enjoy a security and convenience benefit. - EEMeltonIV, on 10/12/2007, -2/+2I don't even own a Mac (yet!) but found the article interesting and worthwhile. Dugg it so I can turn back to it when I finally take the plunge and buy one of Cupertino's fine machines.
- Sphinkterholven, on 10/12/2007, -0/+0I had to repair the permissions or I would not be able to install the software. I lost my printers driver permission somehow and tried to install the new one. It would not work until I fixed the permission. I also had 2 other times where I needed to, one was with my iPhoto's directory and the other I forget. I do not do it on a regular basis.
- WiseWeasel, on 10/12/2007, -2/+1I dunno, it seems that permissions issues were related to some failed updates in the early OS X days. After having to reinstall OS X as an Archive & Install option due to certain functions not working, that was the only thing I could find (incorrect permissions on some system-owned directories). Since I've started repairing permissions as a preventative measure before updates, things have always gone well. I must admit that I mess around with my system files pretty often, applying (harmless, minor) hacks and modifications, so it's possible I mess up my permissions more than most... Even if you tell me it makes no difference to the installer, I think I'm going to keep bringing permissions back in line before updates just to be sure.
- repruhsent, on 10/12/2007, -1/+0Other Unix systems (Linux comes to mind, Solaris is another - although I don't have much Solaris experience so I might be wrong) don't have this problem with repairing permissions. I can only think of a few situations in these systems where a similar utility would come in handy, but for some reason, all the Mac heads use this as their first troubleshooting step (compare to safe mode in XP maybe). I wonder why Mac OS X is so different than other Unices? The automation of Installer maybe? Lazy or stupid software developers writing bad installers?
I like OS X as much as the next guy, but perhaps this is something Apple should look into. - vonnie, on 10/12/2007, -2/+1This is very important to point out. A lot of people think that repairing permissions is harmless, and that you can just as well do it. It is not harmless. It makes your system less secure.
- jayscottgold, on 10/12/2007, -4/+3I repair permissions periodically but...I've never had to do it for any problem I've had and I've never seen any improvements after I've done it...I just do it because everyone says to.
- bonfiglio, on 10/12/2007, -3/+1I have a four week old iMac (17" Intel) and because of this article I ran Disk Utility and found the disk needed a minor repair (bit map something or other). So I restarted using the CD, ran the utility to Repair the disk. I'm squeaky clean again!
Thanks for the article and the reminder to test my drive.
I do maintain a full backup on an external FireWire drive. - Sphinkterholven, on 10/12/2007, -7/+3I love OS X and my macMini but repairing file permissions is a pain in the ass!! I have had to do it 3 times and it took me a bit of googling and looking thru the Apple support to find out what it was in the first place.
I am sure that this digg will turn into a flame war as usual, but this is one of the things that sucks about os X. I think most everything else in OS X is better than Windows and I use them both very frequently. - inactive, on 10/12/2007, -5/+0How about repairing a PowerBook that has burst into flames?
http://digg.com/apple/Another_PowerBook_Mel_Gibsons - WiseWeasel, on 10/12/2007, -7/+1Yes, repairing permissions is a good idea before and after (especially before) you perform any system or security update. Having incorrect permissions during an update can make them go awry (some files might not get updated as they should), and leave you with a messed up system. This advice is more relevant to those who mess around with their system files, especially through the terminal; though it's not a bad idea for typical users as well. Much better to take the time to repair permissions before updates than to have to reinstall MacOS X from scratch when things start misbehaving.
- boohoo, on 10/12/2007, -32/+8aww, macs are so simple and user friendly
no wonder they are holding firm at 3% market share.


What is Digg?
Check out the new & improved