OS X @ permissions and quarantine

Whilst correcting the permissions of my ssh key files on my Mac, I noticed a permissions flag that I hadn’t seen before, an @ sign.

$ ls -la
> -r--------@  1 bmaher  staff   1.7K  4 May  2017 id_rsa

Turns out that this signifies that OS X has applied extended attributes to the file.

I wanted to see what information OS X was adding to the file so I ran:

$ xattr -l id_rsa
> com.apple.quarantine: 0001;56d4c0a9;Google\x20Chrome.app;85AF15BC-7CAE-4D1C-A208-60E2BB234258

This tells me that OS X has quarantined the file (against trojans etc.), noting that it was downloaded through Chrome.

Looks like this is the attribute that determines whether or not that ‘this file was downloaded from the internet…’ message appears when you try to open it.

Since I knew the source of this file, and I won’t be opening it through Finder, I removed the file from quarantine by removing the attribute:

$ sudo xattr -dr com.apple.quarantine id_rsa

… and checked it was gone:

$ ls -la
> -r--------   1 bmaher  staff  1696  4 May  2017 id_rsa
 
0
Kudos
 
0
Kudos

Now read this

Bugs & Scrum

Bugs, those pesky errors that you didn’t foresee. As defined by Wikipedia, a bug is: … an error, flaw, failure or fault in a computer program or system that causes it to produce an incorrect or unexpected result, or to behave in... Continue →