I had a folder under ~/Sites
, let's call it Foo
, from which I was sharing a WordPress site-in-development via Apache. This was working fine, I'd mapped foo.local
to 127.0.0.1
in my hosts file and was accessing the site from there on my laptop.
Then, I tried to access the site from my iPhone. I was able to see the root index of ~/Sites
from the phone by surfing to my-computers-hostname.local
, but couldn't access the WordPress site, as it had been set up to believe its address was foo.local
, and therefore had hardcoded references to that URL in its database. When I attempted to change its URL setting to my-computers-hostname.local
, something very strange happened: I received an authorization error when attempting to save the change. From that point forward, the entire folder containing the WordPress site disappeared from the index page at foo.local
/ my-computers-hostname.local
, and any attempts to access it by URL were met with a 403 – Authorization Refused error from the webserver.
Listing the folder in question in the Terminal showed me that the com.apple.quarantine
extended attribute had been applied to it and to all files contained within. What would cause the operating system to quarantine the folder? Was it the attempted access from another machine, or something to do with WordPress's configuration?
Best Answer
The
com.apple.quarantine
extended attributes probably have nothing to do with the issues you are having with Apache. They are part of the file quarantine feature that was added in 10.5:The
com.apple.quarantine
extended attributes can be added when:/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/Exceptions.plist
.tar
orzip
.LSFileQuarantineEnabled
set to true in theInfo.plist
.The extended attributes have fields for quarantine status, a timestamp, the agent that originated the quarantine event, and sometimes a UUID:
The first field is a hexadecimal bitfield, where for example the seventh bit (2^6 or 0x40) usually gets set after you open a file for the first time.
You can delete the extended attributes with
xattr -dr com.apple.quarantine ~/Sites
, but it won't probably have any effect on Apache. It will however disable the "is a file downloaded from the Internet" dialogs.