Skip to content

Commit 6b05ce6

Browse files
CarlSchwanbackportbot[bot]
authored andcommitted
fix: Fix permission issue when uploading a chunked file
Follow up from nextcloud#59511 Signed-off-by: Carl Schwan <carlschwan@kde.org>
1 parent ab6a1e6 commit 6b05ce6

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

apps/dav/appinfo/v2/publicremote.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* SPDX-License-Identifier: AGPL-3.0-only
77
*/
88
use OC\Files\Filesystem;
9-
use OC\Files\Storage\Wrapper\PermissionsMask;
9+
use OC\Files\Storage\Wrapper\DirPermissionsMask;
1010
use OC\Files\View;
1111
use OCA\DAV\Connector\Sabre\PublicAuth;
1212
use OCA\DAV\Connector\Sabre\ServerFactory;
@@ -111,7 +111,11 @@
111111
$mask |= Constants::PERMISSION_READ | Constants::PERMISSION_DELETE;
112112
}
113113

114-
return new PermissionsMask(['storage' => $storage, 'mask' => $mask]);
114+
return new DirPermissionsMask([
115+
'storage' => $storage,
116+
'mask' => $mask,
117+
'path' => 'files',
118+
]);
115119
});
116120

117121
/** @psalm-suppress MissingClosureParamType */

lib/private/Files/Storage/Wrapper/DirPermissionsMask.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function getPermissions($path): int {
8888
}
8989

9090
public function rename($source, $target): bool {
91-
if (!$this->isUpdatable($source)) {
91+
if (!$this->isDeletable($source)) {
9292
return false;
9393
}
9494

0 commit comments

Comments
 (0)