Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

BenTrovato

macrumors 68040
Original poster
Jun 29, 2012
3,035
2,198
Canada
Hey guys, I can't remove this folder from the trash. I was playing around with the external monitor settings a few weeks ago so I made a backup of the DisplayVendorID file. Now that I no longer need it, when I try to empty the trash, all the files except this folder gets deleted. When I try to delete this folder specifically, I get this error. Any help is appreciated.. thanks.
 

Attachments

  • Screen Shot 2015-12-13 at 9.52.37 AM.jpg
    Screen Shot 2015-12-13 at 9.52.37 AM.jpg
    66.3 KB · Views: 197

nzreg

macrumors member
Nov 14, 2009
54
2
Hey guys, I can't remove this folder from the trash. I was playing around with the external monitor settings a few weeks ago so I made a backup of the DisplayVendorID file. Now that I no longer need it, when I try to empty the trash, all the files except this folder gets deleted. When I try to delete this folder specifically, I get this error. Any help is appreciated.. thanks.
This worked for me, change the name of the file I added an x to mine, then restart computer, then empty trash.
As stated this worked for me on a mini with Yosemite.
Good luck
 

BenTrovato

macrumors 68040
Original poster
Jun 29, 2012
3,035
2,198
Canada
This worked for me, change the name of the file I added an x to mine, then restart computer, then empty trash.
As stated this worked for me on a mini with Yosemite.
Good luck

Try the reboot like simon mentioned, then if that does not work try the app TrashIt.

I tried rebooting but still the same effect. I can't rename a file in the trash. When I drag the file out of the trash and onto the desktop, it created a copy so the file in the trash remains.
 

KALLT

macrumors 603
Sep 23, 2008
5,369
3,393
I tried rebooting but still the same effect. I can't rename a file in the trash. When I drag the file out of the trash and onto the desktop, it created a copy so the file in the trash remains.

Could you run the following command and post the result?
Code:
ls -noORa ~/.Trash/*
 
Last edited:

BenTrovato

macrumors 68040
Original poster
Jun 29, 2012
3,035
2,198
Canada
Could you run the following command and post the result?
Code:
ls -noORa ~/.Trash/*

ls -noORa ~/.Trash/*
total 0
drwxr-xr-x 5 0 restricted 170 13 Aug 02:18 .
drwx------ 4 501 - 136 13 Dec 19:40 ..
-rw-r--r-- 1 0 restricted,compressed 726 13 Aug 02:18 DisplayProductID-4093
-rw-r--r-- 1 0 restricted,compressed 704 13 Aug 02:18 DisplayProductID-409c
-rw-r--r-- 1 0 restricted,compressed 1291 13 Aug 02:18 DisplayProductID-40b6.mtdd
 

KALLT

macrumors 603
Sep 23, 2008
5,369
3,393
ls -noORa ~/.Trash/*
total 0
drwxr-xr-x 5 0 restricted 170 13 Aug 02:18 .
drwx------ 4 501 - 136 13 Dec 19:40 ..
-rw-r--r-- 1 0 restricted,compressed 726 13 Aug 02:18 DisplayProductID-4093
-rw-r--r-- 1 0 restricted,compressed 704 13 Aug 02:18 DisplayProductID-409c
-rw-r--r-- 1 0 restricted,compressed 1291 13 Aug 02:18 DisplayProductID-40b6.mtdd

Alright, that's helpful. Now: have you disabled System Integrity Protection? If not, then that is probably the reason why you cannot delete those files, as they are flagged as "restricted".
 

BenTrovato

macrumors 68040
Original poster
Jun 29, 2012
3,035
2,198
Canada
Alright, that's helpful. Now: have you disabled System Integrity Protection? If not, then that is probably the reason why you cannot delete those files, as they are flagged as "restricted".

I originally disabled it to edit the displayVendor files and then re-enabled it. Should I disable it again and try deleting?
 

KALLT

macrumors 603
Sep 23, 2008
5,369
3,393
I originally disabled it to edit the displayVendor files and then re-enabled it. Should I disable it again and try deleting?

Yes. The system won't let you modify any files that are flagged as restricted. I am not sure what happened, but I presume that the folder in which these files were contained was not protected, which is why you were able to move the folder along with the files to Trash. In general, the System folder is off-limits now as long as SIP is enabled. You directly manipulated these files while SIP was off, but they were automatically protected once SIP was re-enabled.
 

BenTrovato

macrumors 68040
Original poster
Jun 29, 2012
3,035
2,198
Canada
Yes. The system won't let you modify any files that are flagged as restricted. I am not sure what happened, but I presume that the folder in which these files were contained was not protected, which is why you were able to move the folder along with the files to Trash. In general, the System folder is off-limits now as long as SIP is enabled. You directly manipulated these files while SIP was off, but they were automatically protected once SIP was re-enabled.

Amazing! Thank you so much for your help. It worked. I disabled SIP, then I was able to remove the files from the trash. Thanks again!
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,224
15,814
California
Alright, that's helpful. Now: have you disabled System Integrity Protection? If not, then that is probably the reason why you cannot delete those files, as they are flagged as "restricted".
Nice find! That never occurred to me.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.