No such xattr: com.apple.quarantine

The error message “no such xattr: com.apple.quarantine” typically indicates that a specific attribute (xattr) called “com.apple.quarantine” does not exist on a file or directory.

This attribute is commonly associated with files downloaded from the internet on Apple macOS systems. It is used to determine if the file is from an untrusted source and may require additional security measures when opening it.

Here’s an example to help you understand:

ls -l@ /path/to/file

This command lists the extended attributes of a file in macOS. If the “com.apple.quarantine” attribute does not appear in the list, it means the file does not have this attribute set.

To further illustrate, let’s say you have downloaded a “file.zip” from the internet. When checking its attributes using the command above, you might see something like:

-rw-r--r--@ 1 user staff 12345 Jan 1 09:00 file.zip
  com.apple.metadata:kMDItemWhereFroms 483

In this case, you can see that the “com.apple.quarantine” attribute is not present, but there is another attribute called “com.apple.metadata:kMDItemWhereFroms” which stores information about where the file was downloaded from.

To fix the “no such xattr: com.apple.quarantine” error, you can re-download the file or clear the existing attribute for the file using the following command:

xattr -d com.apple.quarantine /path/to/file

After running the command, the attribute will be removed, and you should no longer encounter the error message when accessing the file.

Read more

Leave a comment