Unable to remove uchg user immutable flag/lock with root user

As in thread Unable to remove uchg user immutable flag… - Apple Community

I have the same issue on my macbook air 2014 with BigSur

After uninstalling Dropbox (which was synced with my desktop) there is a Desktop symlink left in my user folder.

I cannot delete or view options of this file.

In terminal I deactivated SIP but command chflags won't delete the uchg flag.

Even activating the root user didn't enable it to change this file.


Dropbox recommended their "fix permissions" option but it didn't fix this file.

Thanks for your help.

Alex

MacBook Air 13″, macOS 11.7

Posted on May 18, 2023 10:35 AM

Reply

Similar questions

2 replies

May 18, 2023 7:42 PM in response to Xalx

I'm not sure I will be any help as I don't usually deal with any complex permissions, ACLs, or special flags, but maybe once we get some more details another more knowledgeable contributor will chime in here.


Did you actually use the DropBox uninstaller?


Was DropBox still active when you ran the DropBox uninstaller?


Are you running any anti-virus apps, cleaning/optimizer apps, or third party security software?


Do you have iCloud enabled or any other file syncing apps?


What is the exact command you used to "fix permissions" options suggested by Dropbox? It really helps to know what has already been suggested & tried & failed.


Run the following command and post the results so we can see the permissions & flags associated with it (that is an uppercase letter "oh" option just after the "e"):

ls  -hleO  $HOME

May 19, 2023 2:11 AM in response to HWTech

Thanks for your help.

For Dropbox I followed the instructions : logout of my account and delete dropbox app.

After that I did not have a Desktop folder any more, the link remained in my $HOME with no rights to modify.

I have no antivirus.

I also use iCloud and Google drive, but I logged out before doing the Dropbox deletion.

Fix Permission is an option in the Account preferences of the Dropbox app, accessible with the Alt Key + click

The other commands I tried :

sudo chmod -N Desktop

sudo chmod ugo+rw Desktop

sudo chflags nouchg Desktop

sudo xattr -d com.dropbox.attrs Desktop


I also disables SIP in recovery mode.

But I could not change the uchg flag.


Final option : I activated root user

Root deleted the uchg flag

Even the root user cannot change xattr or the owner of the file.


For the moment, I just reactivated Dropbox which created the Desktop folder again so that the link works again.

Desktop -> /Users/alex/Dropbox/My Mac (Alexs-MacBook-Air.local)/Desktop


Here is the result of ls :

ls -hleO $HOME

total 16

drwx------@ 5 alex staff - 160B Apr 18 2020 Applications


ls: /Users/alex/Desktop: Permission denied

lrwx------ 1 mac staff - 60B May 11 2021 Desktop

drwx------+ 16 alex staff - 512B May 14 16:57 Documents

0: group:everyone deny delete

drwx------@ 9 alex staff - 288B May 18 19:52 Downloads

0: group:everyone deny delete

1: group:com.apple.sharepoint.group.4 allow search

drwx------@ 13 alex staff - 416B May 14 18:23 Dropbox


and xattr

xattr Desktop

com.dropbox.attrs

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.

Unable to remove uchg user immutable flag/lock with root user

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