os x el capitan can tell you if a file is executable?

Discussion in 'OS X El Capitan (10.11)' started by theprizerevealed, Jul 14, 2016.

  1. theprizerevealed macrumors member

    Joined:
    Feb 26, 2016
    #1
    I obtained some music files in the FLAC format from a questionable source. When I use the Finder to view these files the file ending says .flac but the icons displayed shows the icon for the old style screen for older computers prior to the 1990's with the little words 'exec' for executable in the picture.

    Know which one I mean? Anyway, I wonder if this is a hint from OS X that these files have some executable malware inside the innocuous music file? I know such things are possible from prior experience with limewire and frostwire. Can someone illuminate me? I am new to OS X and it's quite awhile since I used a unix operating system.

    thanks for your input
     
  2. Gav2k macrumors G3

    Gav2k

    Joined:
    Jul 24, 2009
    #2
    .exe files are windows specific OS X will not launch them.
     
  3. Sko macrumors regular

    Sko

    Joined:
    Oct 17, 2009
    Location:
    Germany
    #3
    The exec icon is usually used for terminal scripts or binaries. Sometimes this icon is shown when the finder doesn't know about the file format. Try to open it with an audio editor or vlc, not by double clicking, of course.
     
  4. chabig macrumors 68040

    Joined:
    Sep 6, 2002
    #4
    They probably are executable files. Is your Finder preference set to hide extensions. If it is, files with names like foo.flac.exe will just show up as foo.flac
     
  5. NoBoMac macrumors 6502a

    Joined:
    Jul 1, 2014
    #5
    Additionally to turning on showing of extensions, can do this simple Terminal thing:

    Code:
    cd path-to-folder-with-the-files
    ls -l
    Will give a long listing of the files, will see full name of the files.
     
  6. Nermal Moderator

    Nermal

    Staff Member

    Joined:
    Dec 7, 2002
    Location:
    New Zealand
    #6
    I've seen the "exec" icon on plain text files too. In this case it was some C source code (which won't run without a compiler) and OS X still gave it the "exec" icon. Even worse, dragging and dropping onto TextEdit caused Gatekeeper to tell me that the file can't be opened because it's not signed. Sigh.
     
  7. HenryAZ macrumors 6502

    HenryAZ

    Joined:
    Jan 9, 2010
    Location:
    South Congress AZ
    #7
    Well I'm so used to using PathFinder instead of Finder, I thought that showing the octal permission set under "File Info" was standard, but apparently Finder does not give you that information. You can get the octal display in Terminal by doing a directory listing (ls -al) in the folder where the files live. Look at the left column to see if the "x" bit is present for any of the three sets (user, group, world). If there are any "x"s there, then it is executable by someone. They will look something like this: -rw-r--r-- (octal 644) where the file's owner has read and write, the owner's group and everyone else has read only. An executable file might look like this: -rwxr-xr-- (octal 754) where the owner has read, write, and execute, the owner's group has read and execute, and everyone else read only. A "d" in the first position means that file is really a directory.
     
  8. ScoobyMcDoo macrumors 65816

    Joined:
    Nov 26, 2007
    Location:
    Austin, TX
    #8
    There is a terminal command, "file" which seems to do a better job of reporting a file type. For example, if you create a shell script called foo, make the first line of that shell script read #!/bin/bash, turn the execute permissions off, file will interpret as a shell script, but finder will report it as a text file. Add in executable attributes with "chmod +x foo", file is still consistent, but now finder thinks it is unix executable. Now rename foo with "mv foo foo.flac", finder now thinks it is an audio file, but the "file" command is still not fooled - it still reports it as a shell script.
     

Share This Page