"Operation not permitted" - on deleting folders: Difference between revisions
Jump to navigation
Jump to search
(Created page with "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/Co...") |
No edit summary |
||
Line 4: | Line 4: | ||
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/CoreDataNet: Operation not permitted | ||
rm: 502/2013-06-27-195031/Grob 109A/Applications/Merlin.app/Contents/Frameworks/CoreDataNet.framework/PrivateHeaders: 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 [[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 | |||
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# | |||
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# | |||
After that, the deletion works: | |||
MacBook-Air:.Trashes root# <b><i>rm -Rf 502</i></b> | |||
MacBook-Air:.Trashes root# | |||
[[Category:Shell]] |
Revision as of 11:16, 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#