1.查看是否  the filesystem being mounted as noexec
2.The script was being run from inside a .dmg that had the quarantine flag set on it. When the .dmg was mounted, it was mounting it with a quarantine flag that is inherited, but doesn't show up. I unmounted the .dmg, removed the quarantine flag, and re-mounted it, and all was well.

一下是网络搜索结果的引用:

wKiom1bJFzqyk3KGAAT-h43GnAg695.jpg