Can't delete directory on Mac
We have a package called myapp.component and inside it we have a Content directory with the following permissions:
drwxrwxrwx 4 root wheel 136 Mar 18 15:05 Contents
When I try to delete this directory using
rm -rf Contents
It doesn't work for a reason
rm: Contents/Resources/myapp.rsrc: Permission denied
rm: Contents/Resources: Directory not empty
We have permission to delete the Contents directory, so why is it still not working?
Edit: if I move the package from / Library / Audio / Plug-Ins / Component to ~ / tmp / then it deletes the folder with no problem
thank
You have permission to delete Contents
, but not Contents/Resources/mypp.rsrc
. If you do ls -l
, you will see some more restrictive permissions.
Anyway, from the administrator account, you can:
sudo rm -rf Contents
and it should work fine.
The file is probably still open.
You can use the command lsof
to display open files and find out what to use with them:
lsof | grep "myapp\.rsrc"
You will probably talk about a program with an open file.