Score:0

macos, how to remove permissions which cause: "ls: .: Operation not permitted"

pk flag
eos

Unfortunately, when onedrive stopped working, I ran the onedrive reset tool. This created a directory under /user/me/ called "OneDrive-Personal (Archive)".

Now onedrive is working again, i have to find a way to diff the whole of my .5 TB onedrive "archive" and the current onedrive dir, to find 3 months worth of work which is in the archive and not saved to onedrive.

Unfortunately, even though its in my home directly, I cant access this with tools like "terminal" and "fileMerge". I understand I can do bad things like give terminal full disk access, but this doesnt work for fileMerge.

Instead, I want to remove these crazy extra permissions on the OneDrive-Personal (Archive) dir, and just make it a normal permissioned dir which I have access to.

Any idea how I do this?

This is what the permissions look like:

lrwxr-xr-x    1 me  staff      51  8 Feb  2022 OneDrive -> /Users/me/Library/CloudStorage/OneDrive-Personal
drwx------@  53 me  staff    1696  3 Apr 10:48 OneDrive-Personal (Archive)

presumably that "@" indicates the restrictions we need to remove.

maybe I could tar and untar the dir, and disable permission preservation, although I dont think I have enough disk space for this method.

Prem avatar
cn flag
That `@` indicates Extended Attributes. You can try `ls -l@ ...` to see the Extended Attributes. Alternatively , you can try `xattr -l ...` to get the Extended Attributes. The output on the Containing Directory & the Culprit Directory will show enough information to resolve the Issue.
pk flag
eos
Thanks, but ls -l@ nor xattr -l doesnt tell me anything useful, just says "com.apple.macl". Still dont know how to remove these permissions unfortunately.
Prem avatar
cn flag
You should include the 4 outputs I listed. That output may have something useful.
Prem avatar
cn flag
It looks like `xattr -d com.apple.macl ...` will temporarily delete that unwanted attribute , though MacOS will get that restored quickly ! It looks like MacOS wants "the onedrive reset tool" to access that , no other tool should access that !
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.