5 Replies Latest reply on Sep 2, 2011 1:36 PM by chris.campbell

    Native executable 'execute' permissions stripped on OSX 10.5 Leopard

    Dan Thomas

      We have an AIR application which leverages a C++ executable via NativeProcess. We've made a version of this for Windows and for OSX and packaged the application appropriately for each.The executables are included in an assets folder within the project.

       

      When installing the application through the native installer:

       

      Windows XP/Vista/7 - everything is fine

      Mac OSX 10.6 (Snow Leopard) - everything is fine

      Mac OSX 10.5 (Leopard) - NOT fine, the executables do not have execute permissions

       

      After manually setting execute permissions (chmod +x mynativeexe) everything works as expected

       

      Is there anything we need to be aware of that we're not doing?

      As a workaround could our AIR application run a shell command to set these necesscary permissions?

        • 1. Re: Native executable 'execute' permissions stripped on OSX 10.5 Leopard
          Dan Thomas Level 1

          If it's of any relevance I notice that when installing on OSX you do not get the usual authentication prompt, do we need to do something to ADT to tell the installer the application will require appopriate permissions?

          • 2. Re: Native executable 'execute' permissions stripped on OSX 10.5 Leopard
            Dan Thomas Level 1

            Seems it's a bit hit n miss on 10.6 as we've just tried on another machine and it doesn't have execute permissions required on this install.

             

            So in summary, how do we ensure our native executables bundled with our native application installer get execute permissions?

            • 3. Re: Native executable 'execute' permissions stripped on OSX 10.5 Leopard
              Gsusruls

              I realize that this is an old thread, but I had this problem today and wish this had been solved already. So I'm going to share the solution I found.

               

              I am building an application using the following...

              1) Adobe Flash CS5.5 platform on Windows XP used to generated an Adobe AIR 2.6 build.

              2) Adobe AIR SDK on Mac Snow Leopard 10.6.3 using adt command at Terminal turns AIR file from into a DMG Native Installer.

              3) The DMG contains an APP file, which is double-clicked to install my application to the target machine.

              Note that a DMG Native Installer is required in order to have Adobe AIR NativeProcess support.


              Like OP, all is well when installing from scratch (no existing Adobe AIR Runtime on the target machine prior to application install). The install process prompts the user for a password and the executable buried inside the APP receives permissions which include executable priveledges.

               

              The problem begins to occur when Adobe AIR Runtime is already present on the target machine prior to application install. The install process does not require a password, and the executable inside the APP lacks any executable priveledges. During runtime, the NativeProcess.start() command throws exception Error: #3219, and the executable simply doesn't run.

               

              The solution I found was as follows:

              - strip the APP file out of the DMG

              - use the Terminal native to Mac to modify the permissions. The command to modify the permissions is chmod a+x <executable name>, and the command to confirm it is ls -l

              - Use the Disk Utility native to Mac to create a new DMG out of the new permissions-modified APP file. You should still have the Adobe AIR NativeProcess support.

               

              I installed the new DMG to the target machine, and the permissions stayed as I had set them. I still did not experience an admin password prompt, but the executable seemed to run just as I expected.

              1 person found this helpful
              • 4. Re: Native executable 'execute' permissions stripped on OSX 10.5 Leopard
                Dan Thomas Level 1

                Thanks for the info, we'd never actually identified it was fine when installing without AIR on the target machine and as you see nothing was ever acknowledged here. Thanks again for updating this and hopefully a formal solution or confirmation of the problem will eventually be suggested.

                • 5. Re: Native executable 'execute' permissions stripped on OSX 10.5 Leopard
                  chris.campbell Adobe Employee

                  Hi guys,

                  Thanks for posting the workaround.  I apologize for not seeing this post earlier, but I don't monitor the "development" forums for bugs.

                   

                  I've opened a new external bug on this issue, please take a look and let me know if I've recapped the issue properly.  I'd also like to encourage you to vote/comment.

                   

                  Mac native installer strips executable permissions from installed files if the AIR runtime is already installed

                   

                  Thanks,

                  Chris