Accidentally did "chmod 600 -R /" on my macbook pro

4

1

I accidentally entered sudo chmod 600 -R / when I meant to enter /Documents/some_file and now everything comes up as permission denied. The root password isn't working. All my applications are shut down and basically my whole laptop does not have any permissions to do anything.

I have a macbook pro with Mountain Lion installed. I don't have a disk for the OS. Any help is appreciated. Thanks!

Vipul Shah

Posted 2012-12-24T06:41:05.517

Reputation: 41

2I'd suggest it is time to use the backups you made to restore the filesystem and reverse the permission changes. – mdpc – 2012-12-24T06:58:33.453

Answers

2

There's basically not a lot you can do at this point.

Your first port of call would be to boot into Recovery mode by holding CmdR during startup. From there, you can open Disk Utility, and try to verify permissions. Note though that the permissions changed by this procedure do not incldue all permissions on your system. So, that will probably not help.

Through recovery, you can reinstall OS X from scratch without needing a disc or flash drive containing the OS – it'll simply download everything from the Internet. See this Apple support article for more. This will not remove your user's files but only replace system files. Chances are good that after the 4GB download and installation, you can at least boot into your system again. You could then run a Repair Permissions from Disk Utility again.

That, or restore from your Time Machine backups, of which I'm sure you've made one, right?

slhck

Posted 2012-12-24T06:41:05.517

Reputation: 182 472

Isn't there a Terminal in Recovery mode? – Daniel Beck – 2012-12-24T10:48:26.593

There might be (I've never had to use it), but I don't think that'd be of much use if the OP recursively overwrote the permissions of the whole root directory. Is there anything I'm missing? – slhck – 2012-12-24T10:53:33.853

AFAICT, most files/folders should be 755/644, with the exception of home directories and some files/folders in /etc. But it's much more effort than just restoring from backup... – Daniel Beck – 2012-12-24T10:56:39.107

Thanks so much! I am reistalling the OS through recovery mode. Hopefully it'll work! – Vipul Shah – 2012-12-24T18:33:00.227

0

You can boot a Linux Live CD mount your hard drive there and change permissions.

daya

Posted 2012-12-24T06:41:05.517

Reputation: 2 445

You can use a standard Linux CD to repair problems on a MAC disk? Interesting..... – mdpc – 2012-12-24T07:36:45.623

Only if that live cd can read the file system. – JoshRagem – 2012-12-24T07:46:02.173

-1 Good luck reading the file system. – ta.speot.is – 2012-12-24T09:04:59.240

@ta.speot.is HFS+ file systems can easily be read by a Linux machine. – slhck – 2012-12-24T10:54:16.817

yes you can boot linux on mac. also you can mount HFS+ (apples file system) on linux. – daya – 2012-12-24T12:19:47.583

0

There is nothing you can do apart from Disk Utility / Repair Permissions MAY revert the changes to correct permissions - otherwise a Time Machine backup.

JohnnyVegas

Posted 2012-12-24T06:41:05.517

Reputation: 2 820

0

Theoretically, you could take apart your laptop, remove the hard disk, connect it to a working computer (i.e., as an external hard drive), boot, and fix it from there.  But it is probably more practical to reinstall your OS.

Scott

Posted 2012-12-24T06:41:05.517

Reputation: 17 653