Reset Privileges using batchmod

If I have a locked internal Hard Disk (not the system drive), and under sharing it shows Name: _unknown & privilege: custom, then could I use BatChmod on the entire disk safely (as it is not the drive with OSX installed)? And what settings should I use to reset this?


I was thinking of Owner: MyUserName

Group: Everyone


Would that unlock it so I can read and write to the contents of the drive?


Thanks,


Lawrence

Mac Pro, Mac OS X (10.6.7)

Posted on Apr 20, 2011 9:34 PM

Reply
10 replies

Apr 21, 2011 8:44 AM in response to Lawrence Ingram_Ii

Lawrence Ingram_Ii wrote:


Thanks,


Lawrence-Ingrams-Mac-Pro:~ leahnlaw$ ls -ldeO@ /Volumes/Archive

drw-rw-r--+ 19 502 502 - 714 Apr 20 12:43 /Volumes/Archive

0: 40C0F312-42F5-4FCF-9D28-A2D91B031ED7 allow list,add_file,add_subdirectory,readattr,writeattr,readextattr,writeextattr,read security

Lawrence-Ingrams-Mac-Pro:~ leahnlaw$


That's what I get for one of the drives. Any ideas?


Well, I'm not a Unix expert, but I see a number of problems-

1) There is a strange ACL - I don't know where the long string "40C0..." came from.

2) No one has directory "search" permission (the x-bit is not set)

3) The owner and group owner are listed by number (502) rather than by name, which means that there is currently no user or group with those UID/GID numbers.


With regard to the zero K size, that might be just a consequence of your lack of permission to read/search the volume - we don't know yet what is actually there.


I think it is OK to try BatChmod as you had planned. I would try first just on the volume itself, without checking the box for "Apply to enclosed folders and files."


To do this, you could drag the icon of the volume in question into BatChmod's field to the right of "File...". Then assuming from your Terminal posting that your current admin username is "leahnlaw", I would set up BatChmod this way and click Apply:



User uploaded file

Apr 21, 2011 10:22 AM in response to Lawrence Ingram_Ii

Lawrence Ingram_Ii wrote:


So, he had me just unlock it, hit the plus button, and add my username. WORKED! I'm back in!


Good news!

I think, though, that if you now run the

ls -ldeO@ /Volumes/Archive

command again, you will likely find that the previously messed-up ownership and permissions are still messed-up, and that there is now a new ACL that overrides them, giving you access. I don't know if such an access "patch" could somehow increase the chance of some problem down the road, which might be avoided if instead you correct the ordinary permissions to what they should be, obviating the need for the ACL. At this point, though, you have a functioning system and it might well be prudent to leave well enough alone. Perhaps others here will comment.


What about the contents of the disk? Can you access everything? Are there any folders there with red "no entry " badges?


With respect to the locked system volume in Target Disk Mode, I think it would be OK to run V.K.s Terminal commands. They do not change any ownerships or change any permissions that should not normally be in effect anyway. Actually as written, those commands will act on all mounted volumes, but that should do no harm.

Apr 21, 2011 6:37 AM in response to Lawrence Ingram_Ii

It sounds like it is something different. I would try to find out more about the volume's permissions by looking in Terminal. Get Info is often incomplete.


To try this, open Terminal, and copy-paste the following line into the Terminal window, followed by a single space. Don't type <return> yet:

ls -ldeO@

Next drag the icon for the disk in question into the Terminal window, click inside the Terminal window, and then type <return>. This is for diagnosis only.


Post back the command and the response from Terminal.

Apr 21, 2011 6:58 AM in response to jsd2

Thanks,


Lawrence-Ingrams-Mac-Pro:~ leahnlaw$ ls -ldeO@ /Volumes/Archive

drw-rw-r--+ 19 502 502 - 714 Apr 20 12:43 /Volumes/Archive

0: 40C0F312-42F5-4FCF-9D28-A2D91B031ED7 allow list,add_file,add_subdirectory,readattr,writeattr,readextattr,writeextattr,read security

Lawrence-Ingrams-Mac-Pro:~ leahnlaw$


That's what I get for one of the drives. Any ideas?

Apr 21, 2011 8:11 AM in response to jsd2

Hmmm. . . Here is something interesting. . . since I've had a lot of other problems, I've reinstalled the OS, and now I've opened the Volumes window to access the info window for each of my internal drives, and they are all listing "Zero KB on disk"!!!! They don't show ANY permission info now! What's going on? Have I lost all this?


Ok, I'm starting to panic.


Help please


Lawrence

Apr 21, 2011 9:25 AM in response to jsd2

Ok,


While I was waiting this morning, I thought I'd call AppleCare to see what they said. Guy had me unplug the computer, remove the drives, hold the power button for 10 seconds, plug in the drives again, then power up while holding cmd/opt/p/r for 3 reboot sounds. When it pulled up, I did have the "Sharing & Permissions" section listed in the info window of each drive, but it was still showing "_unknown" for the 1st 2 user groups, and "Custom" as the privilege. So, he had me just unlock it, hit the plus button, and add my username. WORKED! I'm back in! But now, I've plugged up my old mac pro (currently in target disk mode), and it is locked with the little lock in the bottom corner.


Should I use the technique from the other post, or is that bad to use on a system drive?


Thank you SOOO much for helping me out on this! If you lived in Hattiesburg, MS I'd buy you a case of beer or something! 🙂


Lawrence

Apr 23, 2011 7:40 AM in response to jsd2

I've got read and write privileges to everything now. iTunes is acting a little funny about allowing me to add new files (saying it doesn't have the permission), but I can delete files from iTunes, and I can write files to the same location on the disk. I really appreciate you weighing in on this issue. Guys (who know so much more than people like me) taking the time to help out on these forums is a big part of what makes using a Mac so great!


Thanks again!


Lawrence

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Reset Privileges using batchmod

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.