Files cannot anymore be opened from Finder, Finder finds them "damaged" but they are OK

All of a sudden files cannot anymore be opened from Finder. Finder says, the file is damaged. Files can, however, be opened via the corresponding app via File -> open without porblems. If the com.apple.quarantine extended attribute is cleared, files can be opened from Finder exactly once. That opening leads to setting the attribute again, a second try will then show the same behaviour.


The usual googling for solution did not yet find one. FirstAid disk checking (also from the recovery system)

clearing PRam and updating ro sonoma 14.7 all did not help. EtreCheck Report is attached.

Does anyone have a solution? This is really annoying....

Thanks in advance and best wishes,


MacBook Pro 16″

Posted on Oct 7, 2024 11:05 AM

Reply
Question marked as Top-ranking reply

Posted on Oct 8, 2024 12:44 AM

This one is suspicious:


Unsigned Files:

Launchd: /Library/LaunchDaemons/org.macports.shared-mime-info-updater.plist

Command: /opt/local/bin/update-mime-database-real -V /opt/local/share/mime

Details: Gatekeeper bypass





You have a lot of configuration profiles. This is unusual for a private mac, they are often used for school or work issued computers.




You have a very very very old version of VirtualBox. It won't even run on your mac, but it does have its kernel extensions there.


You have a lot of old stuff, including RealPlayer, Silverlight - things that have been deprecated and not working for years. Soundflower was great but has not worked for a while without some trickery, and does not work in Sonoma or Sequoia.


At some point, lots of accumulated cruft from upgrading year over year, and across multiple macs can cause trouble. I am guessing you have been doing so (as many of us do) for a long time.


Perhaps it is time to do a clean install. It is not as hard as it once was.


1) Full Time Machine Backup

2) Erase all contents and settings (it works on your mac and more recent ones); this does NOT erase the OS, which is in its own sealed volume

3) Migrate ONLY the user accounts from the backup

4) Install the applications you do need. It may seem a daunting task but not like when you had to get the dvd or diskettes (yes, I'm that old, I remember installing excel out of seven floppy disks :-))

10 replies
Question marked as Top-ranking reply

Oct 8, 2024 12:44 AM in response to thne

This one is suspicious:


Unsigned Files:

Launchd: /Library/LaunchDaemons/org.macports.shared-mime-info-updater.plist

Command: /opt/local/bin/update-mime-database-real -V /opt/local/share/mime

Details: Gatekeeper bypass





You have a lot of configuration profiles. This is unusual for a private mac, they are often used for school or work issued computers.




You have a very very very old version of VirtualBox. It won't even run on your mac, but it does have its kernel extensions there.


You have a lot of old stuff, including RealPlayer, Silverlight - things that have been deprecated and not working for years. Soundflower was great but has not worked for a while without some trickery, and does not work in Sonoma or Sequoia.


At some point, lots of accumulated cruft from upgrading year over year, and across multiple macs can cause trouble. I am guessing you have been doing so (as many of us do) for a long time.


Perhaps it is time to do a clean install. It is not as hard as it once was.


1) Full Time Machine Backup

2) Erase all contents and settings (it works on your mac and more recent ones); this does NOT erase the OS, which is in its own sealed volume

3) Migrate ONLY the user accounts from the backup

4) Install the applications you do need. It may seem a daunting task but not like when you had to get the dvd or diskettes (yes, I'm that old, I remember installing excel out of seven floppy disks :-))

Oct 10, 2024 8:26 AM in response to thne

I updated my mac from sonoma to sequoia and then it behaved normally again...phew.

I learned that sequoia changed quite some things on the security architecture (XProtect, Gatekeeper...)

so that this former misconfiguration got either overridden or is not taken int account with sequoia.

I still wonder what caused this strange behaviour that seemed to appear so out of the blue in the first place...

Anyway: Thanks, again to all who bothered to take a look!

(and if someone has another idea what might had happened, I'd be glad to know...)

Oct 7, 2024 10:27 PM in response to thne

I have been working with shell scripts and discovered how crazy macOS can get with all the automated behind the scenes things macOS does with files. I don't even know what starts to trigger the problem. I do know that after clearing the extended attribute that opening the file once works and the attribute gets reapplied. I have discovered two things which has helped my script file. One is to clear all of the extended attributes and copying the file using the command line. I don't know what losing the other extended attributes will do to your file & its behavior with macOS or apps.


As a test try this:


Use the following two commands in the Terminal app. The first one copies the file & separates it from the original file (needed when using the APFS file system, otherwise the "copy" will be identical in every way & may get reset):

cp  -p  <path-to-file>   <path-to-new-copy>


Then clear all extended attributes of the file you just copied using the command line:

xattr  -c  <path-to-new-copy>


For example.....if the file is located in the Downloads folder and is called "Bad_File", here is how the commands would look:

cp  -p  ~/Downloads/Bad_File   ~/Downloads/Bad_File2

xattr  -c  ~/Downloads/Bad_File2


Now see how "Bad_File2" behaves. If this works and the other extended attributes do not matter, then you can delete the original file and remove the "2" from the end of the copy you made with the command line.


I know this works for my shell scripts. I have not looked any deeper into the problem.


I do seem to recall another fairly recent thread & post on this forum where there may be a better option, but I don't recall the details.


I do know that the Quarantine extended attribute is attached to any file that is downloaded onto the computer.

Oct 7, 2024 12:24 PM in response to thne

Thank you for posting the report.

The first thing that I suggest is to delete Finder preferences. Weird Finder behavior can result from a corrupt plist file.

In Finder, press Command-Shift-G and paste

~/Library/Preferences/com.apple.finder.plist


Drag the file to the trash


Press Command-Option-Escape, select Finder and click Relaunch.

See how things go from there (it is possible that you may need to remove the quarantine attribute once more but hopefully only once).

Oct 8, 2024 10:12 AM in response to Luis Sequeira1

Thanks for bothering to read all the EtreCheck report. You are completely right, I am an Apple-user for a very long time so things accumulated a little on the system disk ;-). A clean Install is surely a kind of last resort, but a) I still fear the trouble and b) that odd behaviour begann all of a sudden and there _should_ be an easier solution, so I am not ready to give up, yet...

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Files cannot anymore be opened from Finder, Finder finds them "damaged" but they are OK

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.