Allegedly restricted files needlessly obstruct emptying the trash

Number:rdar://29869232 Date Originated:04-Jan-2017 03:08 PM
Status:Open Resolved:
Product:macOS + SDK Product Version:10.12.2 (16C67)
Classification:UI/Usability Reproducible:Always

If a file with "restricted" lineage is in the Trash, even if the user has permission to delete it, the Trash cannot be emptied and leads to nonsensical messages being presented to the user.

Steps to Reproduce:
1. Open Terminal
2. Run these commands (use 501 or the user name of the current user):

sudo ditto /System/Library/CoreServices/ ~/.Trash/
sudo chown -R 501 ~/.Trash/

3. From the Finder, attempt to empty the trash.

Expected Results:
The Trash, being filled with files that are wholly owned by the user, should be emptied.

Actual Results:
An alert:

"Some items in the Trash cannot be deleted because of System Integrity Protection."

If you press "Continue", another alert:

"The operation can’t be completed because the item “ControlStrip” is in use."

It should be noted here that "ControlStrip" is not actually in use.

Now, if you go back to Terminal and simply "rm -rf ~/.Trash/", the files are removed from the trash and no special permissions or warnings are required or generated.

10.12.2 (16C67) 





Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!