Unable to delete a folder ... (from a previous thread)

Message to Bob Harris from this thread: https://discussions.apple.com/thread/252964617


I tried your shell commands again and got a new reply:


Nous@iMacIntel ~ % cd /Users/Nous/Bureau \:\ iMacIntel 

Nous@iMacIntel Bureau : iMacIntel % /bin/ls -dleO@ .

drwx------@ 33 Nous  staff  sunlnk 1056 19 jul 14:56 .

	com.apple.macl	 288 

 0: group:everyone deny delete

Nous@iMacIntel Bureau : iMacIntel % 



Does that mean anything new to you ?

Posted on Nov 28, 2021 10:27 AM

Reply

Similar questions

10 replies

Dec 5, 2021 8:33 AM in response to rlesperance

rlesperance wrote:

I tried:

sudo chmod -a "everyone deny delete" /Users/Nous/Bureau \:\ iMacIntel

everyone isn't a user, so you couldn't possibly set an entry for a non-existent user.

The ACL set for that folder is for the group, "everyone," but that would not prevent you from deleting it.


All of that is irrelevant since you are the user for the folder. You should not need sudo on the commands you are running and you should not be prevented from deleting it in the Finder. It should just ask for Authentication.

You can remove all of the ACLs with:

sudo chmod -aN ~/Bureau\ \:\ iMacIntel


Dec 5, 2021 11:16 AM in response to Robert Lesperance

The folder probably belongs to a higher hidden instance to which I am not allowed ... even if the folder is in the first level of my user folder.

Assuming username Nous, that folder belongs to you, not some "higher hidden instance"

drwx------@ 33 Nous  staff  sunlnk 1056 19 jul 14:56 .

However, it does have a flag I didn't pay attention to, before. sunlnk is apparently put there by System Integrity Protection (SIP). You will likely have to disable SIP in order to remove the folders.


Try:

sudo chflags nosunlink ~/Bureau \:\ iMacIntel

Then, try to delete the folder. If that fails as I suspect, you will need to disable SIP and then delete the folder.T


To disable SIP, boot into Recovery and run this command in Terminal (Utilities menu):

csrutil disable

At this point, you may be able to use rmdir from Terminal, or restart normally, remove the folders, then re-enable SIP in Recovery:

csrutil enable

If you are using an M1 Mac, you will need to boot into One True Recovery--Shut Down, hold power button until you see the Options and enter from there.


Or, you can just leave them there and ignore them.

Dec 5, 2021 11:38 AM in response to Robert Lesperance

chflags: /Users/Nous/Bureau: No such file or directory

chflags: : iMacIntel: No such file or directory

Well, you are somehow getting random responses to the obscure path.

I have no idea why this path worked, but it doesn't for chflags.

cd /Users/Nous/Bureau \:\ iMacIntel 
As for deactivating SIP, I did the procedure with Apple support over the phone and the Trash icon was still grayed out. I was unable to trash the folder.

You might need to remove the sunlnk flag before you can trash the folder.

Dec 5, 2021 8:36 AM in response to Robert Lesperance

Can I try that securely ?

You already own the folder. Adding full rwx access to the Staff group and others won't give you any more power than you already have.


On the other thread you talk about enabling iCloud Backup. I don't know what iCloud Backup refers to. iCloud isn't a backup service and it doesn't provide any service named "Backup." What exactly did you do?

You can "back up" files to iCloud Drive by copying them to that location, but it is not any sort of backup service like Time Machine or Carbon Copy Cloner.

Dec 5, 2021 10:32 AM in response to Barney-15E

Hello Barney,


In the orignal thread, I explained that the «Bureau / iMacIntel» folder was named (French for «Desktop / NameOfMyComputer») and created automatically when I initiated iCloud's sync of the Desktop and the Documents folders. I wrote backup but it is a sync.


When I saw all those changes without knowing in advance what was going on, I stopped the syncing process and was left with that folder that I am not able to delete.


I called Apple to help me, in vain. The folder probably belongs to a higher hidden instance to which I am not allowed ... even if the folder is in the first level of my user folder.


So back to my problem. I tried your suggestion (sudo chmod -aN ~/Bureau\ \:\ iMacIntel). The Trash is grayed out in the Finder window and the folder is still locked. Terminal returned this:


usage:	chmod [-fhv] [-R [-H | -L | -P]] [-a | +a | =a  [i][# [ n]]] mode|entry file ...

	chmod [-fhv] [-R [-H | -L | -P]] [-E | -C | -N | -i | -I] file ...

Nous@iMacIntel ~ % 


Are my explanations more precise ?


Dec 27, 2021 10:35 AM in response to Barney-15E

Hello Barney,


Excuse me for the delay. I had some other «pandemic bears» to kill. Hope you had a quite normal Christmass.


I deactivated SIP and from Terminal runned what you suggested:


-bash-3.2# sudo chflags nosunlink ~/Bureau \:\ iMacIntel
-bash: sudo: command not found
-bash-3.2# 


There may be syntax errors that I am not accustomed or sensible to. Are we getting somewhere ?

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 delete a folder ... (from a previous thread)

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