"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 9: Line 9:
When [[Time Machine]] backups your data, it also applies [[ACL]]s:
When [[Time Machine]] backups your data, it also applies [[ACL]]s:
  MacBook-Air:.Trashes root# ls -le 502/2013-06-27-195031/Grob\ 109A/Applications/Merlin.app/Contents/Frameworks/CoreDataNet.framework/CoreDataNet
  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
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: <b>group:<i>everyone deny</i> write,<i>delete</i>,append,writeattr,writeextattr,chown</b>
  0: <b>group:<i>everyone deny</i> write,<i>delete</i>,append,writeattr,writeextattr,chown</b>
  MacBook-Air:.Trashes root#
  MacBook-Air:.Trashes root#

Latest revision as of 11:23, 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#