Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
I need to buy you a beer!

Your app saved my sanity! THANK YOU!
Using 10.6.7 on a 2011 MBP, BTW, for reference.
I started transferring my info around 5AM yesterday, trying to figure out WHY all my drives were locked and permissions were "custom." Nothing worked until I happened upon your generous app.

Thank you very much, BlueRevolution

I wrote this AppleScript last night. Basically, this thread keeps getting resurrected by people with the same problem over and over, so I thought I'd make a script that goes through the troubleshooting and repair process.

Any bug reports or feedback would be welcome.

Code:
--
-- Repair Disk Permissions 0.1.3
-- By Mikkel Paulson ([email address in app])
--
-- THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND. USE AT YOUR OWN RISK.
--
-- You should always have an up-to-date backup of all of your important files before scratching your
-- nose, let alone mucking around with disk permissions and such.
--
-- This script implements most of the suggestions from the ongoing thread "How do I unlock my
-- external hard drive?" https://forums.macrumors.com/threads/417647/ Specifically, it:
--
-- • Tests all volumes for writability by saving a 0-byte invisible file ".permissions_test_file" to each
--    volume's root directory, then deleting it again.
-- • Reports which volumes are writable and which are not.
-- • Asks the user for permission to attempt to fix writing issues.
-- • Prompts to correct permissions (to drwxrwxr-x root:admin) for HFS+ and JHFS+ volumes.
-- • Gives the option to install MacFUSE and NTFS-3G for NTFS volumes.
-- • Gives the option to format NTFS volumes to JHFS+, FAT32, or a manually-entered format.
-- • Produces a log, including before & after ls -l listings of /Volumes.
--
-- This script has been tested on Mac OS X 10.4 PowerPC and 10.5 Intel computers.
--
-- Please post any questions or bug reports to:
-- https://forums.macrumors.com/threads/871557/
-- If the script is unable to solve your problem, the best place to go is back in the original thread:
-- https://forums.macrumors.com/threads/417647/
--
-- This script is hereby released into the public domain. Feel free to use it or its code for any purpose,
-- with or without attribution.
--
-- Changelog:
-- 0.1.0 - original release
-- 0.1.1 - fixed bug preventing the format process from working
-- 0.1.2 - now works with volumes with spaces in their names
-- 0.1.3 - now a universal binary
--

Sample log:

Code:
Original permissions:
total 24
drwxrwxr-x   8 mikkel  staff   340 Feb 28 17:03 Kohlberg
drwxrwxrwx@  1 root    admin  8192 Feb 28 17:03 Miniluv
d---------  15 root    admin   578 Feb 28 17:03 Minipax
lrwxr-xr-x   1 root    admin     1 Feb 27 07:39 Minitrue -> /

Kohlberg: writable
Miniluv: writable
Minipax: permission denied
Minitrue: writable
Minipax: currently formatted as Journaled HFS +
Minipax: permission repair attempted
Minipax: works now!

New permissions:
total 24
drwxrwxr-x   8 mikkel  staff   340 Feb 28 17:04 Kohlberg
drwxrwxrwx@  1 root    admin  8192 Feb 28 17:04 Miniluv
drwxrwxr-x@ 15 root    admin   578 Feb 28 17:04 Minipax
lrwxr-xr-x   1 root    admin     1 Feb 27 07:39 Minitrue -> /

Code:
Original permissions:
total 8
drwxr-xr-x    1 mikkel  mikkel     0 Apr 22  2009 Kohlberg
lrwxr-xr-x    1 root    admin      1 Feb  3 01:36 The Creature -> /
drwxr-xr-x   38 mikkel  mikkel  1248 Feb 28 17:33 mikkel

Kohlberg: permission denied
The Creature: writable
mikkel: writable
Kohlberg: currently formatted as NTFS
Kohlberg: reformatted to JHFS+
Kohlberg: works now!

New permissions:
total 8
drwxr-xr-x    4 mikkel  mikkel   238 Feb 28 17:36 Kohlberg
lrwxr-xr-x    1 root    admin      1 Feb  3 01:36 The Creature -> /
drwxr-xr-x   38 mikkel  mikkel  1248 Feb 28 17:34 mikkel
 
BlueRevolution saved my life or at least my ExtHD...

BlueRevolution,

I just want to personally thank you for your Repair Disk Permissions 0.1.3!
And YOU ROCK!!!I have been searching and stressing on my external HD that I lost Permission to and after using your app, it is back! I can breath again.

In your debt,
greentree23
 
Know this is old now - but just tried your script, but didn't work - got the following (the MyBook is the drive I'm trying to unlock...):


Original permissions:
total 72
drwx------ 1 Admin staff 16384 Aug 22 21:11 DuneHDD_e78fef15_e037_4d11_975d_5de3092c96c2
lrwxr-xr-x 1 root admin 1 Sep 2 10:56 Macintosh HD -> /
drwxrwxr-x 16 Admin staff 612 Sep 3 07:50 MyBook
drwx------ 1 Admin staff 16384 Sep 2 22:08 MyBook_2c02f530_4538_38c0_ac8a_448054754c0a

DuneHDD_e78fef15_e037_4d11_975d_5de3092c96c2: writable
Macintosh HD: permission denied
MyBook: writable
MyBook_2c02f530_4538_38c0_ac8a_448054754c0a: permission denied
Macintosh HD: still borked 'cos of The command exited with a non-zero status.
MyBook_2c02f530_4538_38c0_ac8a_448054754c0a: still borked 'cos of The command exited with a non-zero status.

New permissions:
total 72
drwx------ 1 Admin staff 16384 Sep 3 08:03 DuneHDD_e78fef15_e037_4d11_975d_5de3092c96c2
lrwxr-xr-x 1 root admin 1 Sep 2 10:56 Macintosh HD -> /
drwxrwxr-x 16 Admin staff 612 Sep 3 08:03 MyBook
drwx------ 1 Admin staff 16384 Sep 2 22:08 MyBook_2c02f530_4538_38c0_ac8a_448054754c0a
 
Script

Hey does this script reformat you drive? We are having an issue with an external hard drive we removed from one mac to another. It says we do not have permissions but when I try to change them to read/write, it reverts back to custom. I found this article with the script, but afraid to run it due to our hard drive is 1.7TB and we cannot lose this data.
 
I wrote this AppleScript last night. Basically, this thread keeps getting resurrected by people with the same problem over and over, so I thought I'd make a script that goes through the troubleshooting and repair process.

Any bug reports or feedback would be welcome.

Code:
--
-- Repair Disk Permissions 0.1.3
-- By Mikkel Paulson ([email address in app])
--
-- THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND. USE AT YOUR OWN RISK.
--
-- You should always have an up-to-date backup of all of your important files before scratching your
-- nose, let alone mucking around with disk permissions and such.
--
-- This script implements most of the suggestions from the ongoing thread "How do I unlock my
-- external hard drive?" https://forums.macrumors.com/threads/417647/ Specifically, it:
--
-- • Tests all volumes for writability by saving a 0-byte invisible file ".permissions_test_file" to each
--    volume's root directory, then deleting it again.
-- • Reports which volumes are writable and which are not.
-- • Asks the user for permission to attempt to fix writing issues.
-- • Prompts to correct permissions (to drwxrwxr-x root:admin) for HFS+ and JHFS+ volumes.
-- • Gives the option to install MacFUSE and NTFS-3G for NTFS volumes.
-- • Gives the option to format NTFS volumes to JHFS+, FAT32, or a manually-entered format.
-- • Produces a log, including before & after ls -l listings of /Volumes.
--
-- This script has been tested on Mac OS X 10.4 PowerPC and 10.5 Intel computers.
--
-- Please post any questions or bug reports to:
-- https://forums.macrumors.com/threads/871557/
-- If the script is unable to solve your problem, the best place to go is back in the original thread:
-- https://forums.macrumors.com/threads/417647/
--
-- This script is hereby released into the public domain. Feel free to use it or its code for any purpose,
-- with or without attribution.
--
-- Changelog:
-- 0.1.0 - original release
-- 0.1.1 - fixed bug preventing the format process from working
-- 0.1.2 - now works with volumes with spaces in their names
-- 0.1.3 - now a universal binary
--

Sample log:

Code:
Original permissions:
total 24
drwxrwxr-x   8 mikkel  staff   340 Feb 28 17:03 Kohlberg
drwxrwxrwx@  1 root    admin  8192 Feb 28 17:03 Miniluv
d---------  15 root    admin   578 Feb 28 17:03 Minipax
lrwxr-xr-x   1 root    admin     1 Feb 27 07:39 Minitrue -> /

Kohlberg: writable
Miniluv: writable
Minipax: permission denied
Minitrue: writable
Minipax: currently formatted as Journaled HFS +
Minipax: permission repair attempted
Minipax: works now!

New permissions:
total 24
drwxrwxr-x   8 mikkel  staff   340 Feb 28 17:04 Kohlberg
drwxrwxrwx@  1 root    admin  8192 Feb 28 17:04 Miniluv
drwxrwxr-x@ 15 root    admin   578 Feb 28 17:04 Minipax
lrwxr-xr-x   1 root    admin     1 Feb 27 07:39 Minitrue -> /

Code:
Original permissions:
total 8
drwxr-xr-x    1 mikkel  mikkel     0 Apr 22  2009 Kohlberg
lrwxr-xr-x    1 root    admin      1 Feb  3 01:36 The Creature -> /
drwxr-xr-x   38 mikkel  mikkel  1248 Feb 28 17:33 mikkel

Kohlberg: permission denied
The Creature: writable
mikkel: writable
Kohlberg: currently formatted as NTFS
Kohlberg: reformatted to JHFS+
Kohlberg: works now!

New permissions:
total 8
drwxr-xr-x    4 mikkel  mikkel   238 Feb 28 17:36 Kohlberg
lrwxr-xr-x    1 root    admin      1 Feb  3 01:36 The Creature -> /
drwxr-xr-x   38 mikkel  mikkel  1248 Feb 28 17:34 mikkel

Hi, I am a total noob and know how to use only the basics. After installing 'El Capitan", I had permission issues to my external hard drive, so I downloaded and ran your code, but it didn't work. These are the results:

Original permissions:

total 8

Code:
lrwxr-xr-x   1 root                admin      1 Oct 29 07:09 Macintosh HD -> /

drwxr-xr-x@  1 fotiosmoutsopoulos  staff  16384 Oct 27 19:13 SKLIROS DISKOS DORITA

drwxrwxrwx@ 10 fotiosmoutsopoulos  staff    340 Nov 14  2009 WD SmartWare



Macintosh HD: permission denied

SKLIROS DISKOS DORITA : permission denied

WD SmartWare: permission denied

Macintosh HD: still borked 'cos of The command exited with a non-zero status.

SKLIROS DISKOS DORITA : still borked 'cos of The command exited with a non-zero status.

WD SmartWare: still borked 'cos of The command exited with a non-zero status.



New permissions:

total 8

Code:
lrwxr-xr-x   1 root                admin      1 Oct 29 07:09 Macintosh HD -> /

drwxr-xr-x@  1 fotiosmoutsopoulos  staff  16384 Oct 27 19:13 SKLIROS DISKOS DORITA 

drwxrwxrwx@ 10 fotiosmoutsopoulos  staff    340 Nov 14  2009 WD SmartWare

Any help how to gain write permission to my hard drive again???

thnx in advance
 
Last edited by a moderator:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.