mac tomcat: error 1 operation not permitted

在用微信传一个tomcat压缩包到别人后,解压后无法用idea启动,提示 error 1 operation not permitted,但是直接用命令可以执行。

仔细查看,原来是因为mac出于安全考虑,针对不允许执行的文件加了隔离属性。此属性为com.apple.quarantine。

具体会产生这个属性的解释如下:

http://apple.stackexchange.com/questions/104712/what-causes-os-x-to-mark-a-folder-as-quarantined

http://superuser.com/questions/28384/what-should-i-do-about-com-apple-quarantine

 删除该属性的命令:

xattr -dr com.apple.quarantine ~/Sites

删除后,即可正常执行。

原文地址:https://www.cnblogs.com/asfeixue/p/5695587.html