How to remove Quarantine from file permissions in OS X

13

3

I downloaded a .pem file and my Mac OS X (10.8.2) added an @ sign at the end of the file permissions. This is causing file permission issues.

I can't seem to remove the quarantine flag. I even tried the command

xattr -d <filename>.pem 

but that didn't work.

Arunabh Das

Posted 2013-01-02T04:13:55.657

Reputation: 611

Answers

19

First, use ls -l@ to see what extended attributes are attached to the file. Normally, a downloaded file will have xattrs named "com.apple.quarantine" and maybe "com.apple.metadata:kMDItemWhereFroms". To remove them, you can delete them individually with e.g. xattr -d com.apple.quarantine filename.pem, or clear all xattrs with xattr -c filename.pem

Gordon Davisson

Posted 2013-01-02T04:13:55.657

Reputation: 28 538

And to expand upon this, to unquarantine an entire directory, xattr -r -d com.apple.quarantine directory. – AKX – 2020-02-06T16:35:33.560