Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Files and folders turned into exec files

Some of my folders are turning into exec files, even a few files have done that. I saw it first after using the Microsoft cloud drive (OneDrive), so stopped using that. But lately some files are still turning exec, esp if they have been unused for a year or two, or been on a flash drive.


Using OS 10.11.6 on a MacBook Pro (2012) + OS 10.12 on a MacBook (2016).

External drive: LaCie, Mac-formatted.


Using Intego Virus Barrier and Net Barrier protection for 4 years, latest versions, they find no errors.

MacBook Pro with Retina display, OS X El Capitan (10.11.6), Model: MacBookPro11,3

Posted on Dec 31, 2016 6:16 AM

Reply
9 replies

Jan 1, 2017 10:26 AM in response to thomas_r.

As far as I know I've not been connected to any Windows PC, only the Microsoft OneDrive cloud service, where is when I first saw this happen. The files look exactly like the one you show, and as they were folders, they have the same name as the original folders, with no extension.

Jan 2, 2017 3:50 AM in response to oy

oy wrote:


I've not been connected to any Windows PC, only the Microsoft OneDrive cloud service, where is when I first saw this happen.


If the affected files are all on OneDrive, my guess is that they were accessed at some point from an infected Windows PC.


The files look exactly like the one you show, and as they were folders, they have the same name as the original folders, with no extension.

Did you check for an extension using Get Info? If not, you need to do that, as extensions may be hidden in the Finder, but will always be visible there.


If they really truly had no extension, and if some of the affected files had never been on Microsoft OneDrive, that may be a sign of disk corruption, and the initial association with OneDrive was simply coincidence.

Jan 28, 2017 3:02 AM in response to oy

I have the same problem. All files affected appear to be at least pfd files that had no extensions when originally saved. This is probably the cause of all (hundreds) of initial warnings when my stuff was uploaded to OneDrive. SO every time I open a pfd, I have to manually add the extension to it.

Such a Windows-esque quirk: extensions should always visible in file names. So I guess the way OneDrive stores data is on millions on floppy disks in the "cloud."

Jan 30, 2017 5:54 AM in response to oy

When I open in Terminal the folder "Bagateller-til-Saeverud" which has now become an exec file, this comes up:


Last login: Mon Jan 30 14:32:25 on console

/Volumes/LaCie-TB/\!OyMusikk/\!\!OyMelodiCD_2016-BU/Bagateller-til-Saeverud ; exit;

Oyvinds-MacBook-Pro:~ oy$ /Volumes/LaCie-TB/\!OyMusikk/\!\!OyMelodiCD_2016-BU/Bagateller-til-Saeverud ; exit;

-bash: /Volumes/LaCie-TB/!OyMusikk/!!OyMelodiCD_2016-BU/Bagateller-til-Saeverud: cannot execute binary file

logout

Saving session...

...copying shared history...

...saving history...truncating history files...

...completed.

Deleting expired sessions...none found.

Dec 31, 2016 7:45 AM in response to oy

Do these files you're seeing have a particular extension? Select one and choose Get Info from the File menu, then look at the Name & Extension info.


If a file doesn't have an extension at all, it will be displayed with an icon like this:


User uploaded file


That doesn't mean it's actually an executable file, but the Finder doesn't know what it is. In such a case, you need to give the file the proper extension for the type of file that it is.


If you're seeing files and folders replaced by files with a .exe or .lnk extension, those files/folders have been exposed to a Windows PC that is infected with malware. In the case of a flash drive, it has been connected to an infected Windows PC. If you're seeing files on your Mac hard drive showing this behavior, they either got copied or synced from an infected Windows machine, or you have some kind of file sharing that allows an infected Windows PC to access and modify files on your Mac.


In the case of .lnk files, the originals have probably been hidden elsewhere on the disk and are intact. Try showing hidden files and looking for the missing items in a hidden folder on the drive in question. Note that there are normally quite a few hidden folders/files on the main drive with your system, and there are always some hidden items on external drives as well. Do not mess with those if they aren't obviously a repository for the missing files!


If the extension is something like .exe, there's probably no easy solution. Those files/folders may have been encrypted (if the Windows PC was infected with ransomware).

Files and folders turned into exec files

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