Cannot remove an empty folder, got "Permission denied" even with sudo
Tried everything I could to remove an empty folder from my MacBook Air M3 running MacOS Sonoma 14.5.
- The start of the issue: cannot empty the Trash when the folder in. If I put the folder (named "cannot_remove") into Trash and try to empty it, I would get "The operation can’t be completed because the item “cannot_remove” is in use.". Tried to restart the system, go into safe mode and even turn off System Integrity Protection, none seem to work.
- From the terminal side (confirmed no hidden file inside, fixed permission, fixed ownership) (Worth noting though I can rename it, or move it around.):
yang@Yang-MacBook temporary % ls -la cannot_remove
total 0
drwxr-xr-x 42 yang staff 1344 Jun 26 22:40 .
drwxr-xr-x 7 yang staff 224 Jul 3 10:38 ..
yang@Yang-MacBook temporary % sudo chown -R $(whoami) cannot_remove
yang@Yang-MacBook temporary % sudo chmod -R 755 cannot_remove
yang@Yang-MacBook temporary % sudo rm -rf cannot_remove
rm: cannot_remove: Permission denied
3. Also checked the info panel:
Any advice would be appreciated! Thanks!
MacBook Air 13″