MacOS – Files wrongly considered as damaged in encfs volume

filesystemmacosmacports

I am using encfs @1.7.5 and osxfuse @2.6.4 installed via MacPorts 2.2.1 on my MacBook Pro Retina Late 2013 which is running OS X Mavericks 10.9.2. When opening certain files (e.g. xlsx, pdf) in my encfs volume, I get an error "X is damaged and can't be opened." as well as a suggestion to move it to trash. However, when I copy that file elsewhere (i.e. not on the encfs volume), it appears to work just fine. Why is this?

EDIT: I looked online and found a post involving disabling GateKeeper. It did the trick. In essence, you go into "Security Preferences -> Security & Privacy -> Allow applications downloaded from: Anywhere".

I understand that the solution works, but I would like to know why it works. Thanks in advance.

EDIT 2: Also, if someone could tag my post with encfs, it'd be very appreciated.

Best Answer

I've found the answer here (for BoxCryptor):

Under special circumstances, Mac OS X adds the extended attribute 'com.apple.quarantine' to a file which was e.g. downloaded from the internet. This can also happen to files within the BoxCryptor Folder. If an encrypted file has this extended attribute set, you receive the "is damaged" error message when trying to open the plaintext file in the BoxCryptor Volume.

Also try this, more secure workaround:

x) Open Terminal (Applications -> Utilities)

y) Run the following command (substitute the path):

$ xattr -r -d com.apple.quarantine /path/to/encfs/mount/point