"Operation not permitted" - on deleting folders: Difference between revisions

From Wurst-Wasser.net
Jump to navigation Jump to search
No edit summary
No edit summary
Line 14: Line 14:


The solution is deleting the [[ACL]]s.
The solution is deleting the [[ACL]]s.
  MacBook-Air:.Trashes root# chmod -RN 502  
  MacBook-Air:.Trashes root# <b><i>chmod -RN 502</i></b>
  MacBook-Air:.Trashes root#
  MacBook-Air:.Trashes root#



Revision as of 11:17, 8 September 2013

I was about to delete a Time Machine Backup-Folder, and I got that:

MacBook-Air:.Trashes root# rm -Rf 502
rm: 502/2013-06-27-195031/Grob 109A/Applications/Merlin.app/Contents/Frameworks/CoreDataNet.framework/CoreDataNet: Operation not permitted
rm: 502/2013-06-27-195031/Grob 109A/Applications/Merlin.app/Contents/Frameworks/CoreDataNet.framework/PrivateHeaders: Operation not permitted
[…]
MacBook-Air:.Trashes root#

When Time Machine backups your data, it also applies ACLs:

MacBook-Air:.Trashes root# ls -le 502/2013-06-27-195031/Grob\ 109A/Applications/Merlin.app/Contents/Frameworks/CoreDataNet.framework/CoreDataNet

lrwxrwxrwx+ 1 appleadmin admin 28 Dec 28 2007 502/2013-06-27-195031/Grob 109A/Applications/Merlin.app/Contents/Frameworks/CoreDataNet.framework/CoreDataNet -> Versions/Current/CoreDataNet

0: group:everyone deny write,delete,append,writeattr,writeextattr,chown
MacBook-Air:.Trashes root#

The solution is deleting the ACLs.

MacBook-Air:.Trashes root# chmod -RN 502
MacBook-Air:.Trashes root#

After that, the deletion works:

MacBook-Air:.Trashes root# rm -Rf 502
MacBook-Air:.Trashes root#