0

I have created an application for OSX that I intend to distribute by download of an .app file from my website. The problem is that when the file is downloaded, then executed it stalls and the console says "sh: : Permission Denied"

This does not happen if the file is copied to other computers through a flash drive or CD and everything works fine.

What is happening and how can I overcome the error so that I can distribute the program through my website? It must be some OSX precautionary measures for programs downloaded from the web?! What works is "sudo open -a" from terminal but that's not good enough for a user-friendly distribution. This step is not necessary unless the file comes from the web.

Things I have tried: multiple OSX systems, changing privelages to "read and write" in Get Info of the file, placing the file in different locations

EDIT: After going through lots of documentation and google searches I have now solved this issue. The problem was execution of files contained in the .app folder. This function is apparently restricted when OSX cannot identify the developer of the file downloaded from the internet. To solve this, I added

os.chmod(<file_directory>,0777)

where '<'file_directory'>' was the path to any file that is or could be executed by my program and is contained in the .app folder.

The program was written in Python 2.7.

DrOrpheum
  • 23
  • 6

1 Answers1

0

İn Unix system have 3 bit for file Read,Write,Execute.İf you want execute your 3 bit integer is odd number. as: 1 3 7. Write this comment and work now fine chmod 777. First 7 is owners second for group and last is guest permission.

anilkay
  • 144
  • 1
  • 8
  • Thank you anilkay. It works this way! But how can I implement it so that the user does not have to run chmod to get it running? – DrOrpheum Feb 18 '18 at 14:40