diff --git a/apps/files_sharing/lib/permissions.php b/apps/files_sharing/lib/permissions.php
index 31b7ac361ae8f5bfe6643040cf806a6f77185b10..c3ad63e2fd26b6ab8725d3b9619151ea85beea87 100644
--- a/apps/files_sharing/lib/permissions.php
+++ b/apps/files_sharing/lib/permissions.php
@@ -31,7 +31,9 @@ class Shared_Permissions extends Permissions {
 	 */
 	public function get($fileId, $user) {
 		if ($fileId == -1) {
-			return \OCP\PERMISSION_READ;
+			// if we ask for the mount point return -1 so that we can get the correct
+			// permissions by the path, with the root fileId we have no idea which share is meant
+			return -1;
 		}
 		$source = \OCP\Share::getItemSharedWithBySource('file', $fileId, \OC_Share_Backend_File::FORMAT_SHARED_STORAGE,
 			null, true);