diff --git a/sites/default/modules/file_entity_perms/file_entity_perms.module b/sites/default/modules/file_entity_perms/file_entity_perms.module
index a76e83f..29c8975 100644
--- a/sites/default/modules/file_entity_perms/file_entity_perms.module
+++ b/sites/default/modules/file_entity_perms/file_entity_perms.module
@@ -282,3 +282,24 @@ function file_entity_perms_file_entity_perms_role_access($file, $account, $permi
     return FILE_ENTITY_ACCESS_DENY;
   }
 }
+
+/**
+ * Implements hook_file_download().
+ */
+function file_entity_perms_file_download($uri) {
+  // Load the file from the URI.
+  $file = file_uri_to_object($uri);
+
+  // An existing file wasn't found, so we don't control access.
+  // E.g. image derivatives will fall here.
+  if (empty($file->fid)) {
+    return NULL;
+  }
+
+  // Allow the user to download the file if they have appropriate permissions.
+  if (file_entity_access('view', $file)) {
+    return file_get_content_headers($file);
+  }
+
+  return -1;
+}
