Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2021-10-07 12:50:33 +0300
committerCarl Schwan <carl@carlschwan.eu>2021-10-28 14:29:50 +0300
commitbfa60aaf2774d08fe8ec3d42ff3a87e3b2f44277 (patch)
tree06154a038738fa7fb5625c4f564117e085b6e946 /lib/private/Files/Cache
parent857c769d7557aa7d925147ffa69012aa5f72495c (diff)
Fix permissions when copying from ObjectStorage
Make sure that when a user copy a file from a directory they don't have all permissions to a directory where they have more permissions, the permissions are correctly set to the one from the parent taget folder. This was caused by the ObjectStoreStorage::copyFromStorage using the jailed storage and cache entry instead of the unjailed one like other storages (the local one). Steps to reproduce + Use object storage + Create a groupfolder with one group having full permission and another one who can just read files. + With an user who is in the second group, copy a file from the groupfolder to the home folder of this user. + The file in the home folder of the user will be read only and can't be deleted even though it is in their home folder and they are the owner. In oc_filecache, the permissions stored for this file are 1 (READ) Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'lib/private/Files/Cache')
-rw-r--r--lib/private/Files/Cache/Cache.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php
index aec97d1ad33..443a2b554a0 100644
--- a/lib/private/Files/Cache/Cache.php
+++ b/lib/private/Files/Cache/Cache.php
@@ -1009,7 +1009,7 @@ class Cache implements ICache {
* @param ICache $sourceCache
* @param ICacheEntry $sourceEntry
* @param string $targetPath
- * @return int fileid of copied entry
+ * @return int fileId of copied entry
*/
public function copyFromCache(ICache $sourceCache, ICacheEntry $sourceEntry, string $targetPath): int {
if ($sourceEntry->getId() < 0) {