Plain Text to Unix Executable File?

Discussion in 'macOS' started by ElectricMan5, Aug 22, 2009.

  1. ElectricMan5 macrumors regular

    Joined:
    Jul 22, 2008
    #1
    I just downloaded a World of Warcraft patch, and whenever I opened the updater it would instantly close. The icon doesn't even have a chance to appear in the dock, but i see the dock get a bit bigger and the little light that appears underneath the icon flickers.

    I looked at the contents of the update, and in the "MacOS" folder, the file called Installer, which on other patches is a Unix Executable File, is a Plain Text file.

    I didn't know if this was the problem, so I took the same file from another patch and replaced the plain text with the unix executable file, and the window appeared, though of course since it was from another patch, it wouldn't update.

    So how do I convert that plain text file to a unix executable file?
     
  2. mkrishnan Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #2
    Open a terminal window, cd to the folder in question, and then...

    chmod 755 thenameofthefile
     
  3. ElectricMan5 thread starter macrumors regular

    Joined:
    Jul 22, 2008
    #3
    Haha yeah I figured it out myself. I did chmod xy+ or something... but otherwise it works.

    I'm still returning an error though installing... hmm... probably something wrong with WoW itself.
     
  4. sammich macrumors 601

    sammich

    Joined:
    Sep 26, 2006
    Location:
    Sarcasmville.
    #4
    That's weird. Maybe you have to download the patch again? What extension does that plain text have? What is in it if you open it in textedit.

    EDIT: well I guess I'll leave this comment here anyway.
    And that terminal command will make a 'script' executable, but it does not turn a script into an executable, right? An executable will have a black 'terminal' entry icon and a plain text/no extension file appears as a plain white file icon.
     
  5. mathcolo macrumors 6502a

    Joined:
    Sep 14, 2008
    Location:
    Massachusetts
    #5
    chmod 755?

    You should just be able to add the executable flag to the file by doing:

    chmod +x thenameofthefile
     
  6. mkrishnan Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #6
    Old habits.... :p
     
  7. ElectricMan5 thread starter macrumors regular

    Joined:
    Jul 22, 2008
    #7
    Yeah that's exactly what I did. Now I'm just getting an error updating... says "Preparing to update" then it just crashes. It did it before also on the same patch from a different host...
     
  8. gilkisson macrumors 65816

    gilkisson

    #8
    If you didn't want to change permissions on the file itself:

    Which will cause the bash shell to execute the file...
     

Share This Page