1

I'm having some trouble deleting some folders that contain nothing and have no processes or kexts utilizing them (lsof | grep path_element). When I try to delete them (as root) I get:

root@hostname /# rm -fr /path/to/folder
rm: /path/to/folder: Operation not permitted

Even after executing the following to strip ACLs / extended attributes, I still cannot rm -fr the folders:

sudo chmod -RN /path/to/folder
sudo xattr -c -r /path/to/folder

Executing ls shows no attributes:

ls -lea -@ /path/to/folder

Any other options to ensure all permissions are stripped and that an rm operation as root should work?

ylluminate
  • 5,311

1 Answers1

1

The culprit that was stopping the folder from being deleted was apparently flags being set and so the following finally allowed deletion:

sudo chflags -R nouchg,noschg /path/to/folder
ylluminate
  • 5,311