I have just saved some data from a crashed PC to my external HD, which is a HFS+ Volume using Ubuntu live (regular copy no dd). Now I am lost: I don't have any privileges in the Folder i copied on my Macbook. I tried changing it using chmod and chown, both as regular user and as root, but I always get a "operation not permitted".The owner for all those files is "999".
|
As Karmatic has said, it may likely be an issue with ACLs, but I would advise against changing your users UID as that seems like a backward solution and may break things (like the inability to login or access some critical files). You want to fix the files, not break the user UID ;) If the problems lie with ACLs, or rather ACEs (which are the rulesets for ACL, or better known as access control entries), then you need to repair them. You can list a directory or files ACEs using the ls "e" function. Run the "ls -le" command from Terminal. You should see output like this:
In the above example, you can see that I am the owner and the group those directories belong to is "staff", which I am a part of. Then you can see that each one has the same ACE, in this case, not everyone can delete the directory. So if we put it all together, there are no ACEs that protect the directories from read or write, but there is no that protects it from deletion, so that you either have to be the owner, or part of that group to delete it. It is also of note that ACEs are ordered lists, in that, the first rule hit is the one that applies, and all the rest get ignored. For example, if you had a rule that allowed write to a file, and then one that prevented write right after it, the file would be writeable. ACLs were introduced in Tiger and remain largely unchanged. Ars Technica has a terrific rundown on how they work (they supersede chmod btw) and how to manage them: http://arstechnica.com/apple/reviews/2005/04/macosx-10-4.ars/8 And it is of note that OS X's Repair Permissions command only repairs system files critical for the operation of the OS, not user files. |
||||
|
|
|
I had a similar situation when I tried to access system files of a NAS drive through my iMac. As @jm666 already pointed out this happens due to ACLs. When you create a user in Mac he/she gets a unique ID(uid) in the range of 500+. You can find your current uid by running, If all the other solutions didn't work you can try to create a new user on your Mac and a group with a id similar to linux user and you should be able to access all the files with read/write permissions. Here are the steps you should follow.
|
|||
|
|
|
Part1: Maybe, you will need repair permissions - easily done with Finder.
The above should repair permissions - but - probably will not help (as you already told) Part2: If the part1 not helped, probably (and only maybe!) you have an broken ACL list. (because files are copied at another OS). OS X HFS has not only usual chmod modes, but maintain ACL (access control list) too. Try this in the Terminal.app - DON'T copy&paste all at once, enter the commands one by one...
now you can quit Terminal.app and check access to files via Finder and you should repeat the first part - changing permissions via Finder's -> CMD-I ... |
|||
|
|
|
Last time I had such a problem a check disk helped. Since you mentioned ”crashed” and alternative operating systems: Could it be that the disk is marked as dirty? |
|||
|
|
