diff --git a/lib/Mount/MountProvider.php b/lib/Mount/MountProvider.php index 0085755c3..367f518a9 100644 --- a/lib/Mount/MountProvider.php +++ b/lib/Mount/MountProvider.php @@ -219,7 +219,7 @@ public function getMount( // apply acl before jail if ($acl && $user) { - $inShare = $this->getCurrentUID() === null || $this->getCurrentUID() !== $user->getUID(); + $inShare = !\OC::$CLI && ($this->getCurrentUID() === null || $this->getCurrentUID() !== $user->getUID()); $aclManager ??= $this->aclManagerFactory->getACLManager($user, $this->getRootStorageId()); $aclRootPermissions = $aclManager->getPermissionsForPathFromRules($rootPath, $rootRules); $storage = new ACLStorageWrapper([