Commit graph

1630 commits

Author SHA1 Message Date
Robin Appelman
7dd310e377 fix: don't update cached mountpoints if the request doesn't have filesystem access
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-08-24 20:22:37 +02:00
Robin Appelman
662129ca0a perf: set the folder size in the same query as we create it
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-06-05 11:57:59 +02:00
Louis Chemineau
dafdd6167e fix(S3): Use original folder size during copy
This prevent having copied folders with a wrongly set size of 0KB.

- Fix https://github.com/nextcloud/server/issues/51916

Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-06-05 11:57:59 +02:00
Andy Scherzinger
d9fdd39181
Merge pull request #52788 from nextcloud/backport/51920/stable29
[stable29] fix: improve handling of newFolder race condition handling
2025-05-25 16:52:00 +02:00
Robin Appelman
e30bd9120b fix: improve handling of newFolder race condition handling
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-13 11:59:16 +00:00
Robin Appelman
63e7bb6291 fix: restore updated encrypted version when copying versions
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-08 18:57:27 +00:00
Côme Chilliet
a1065197b5 fix: Fix copying to the root of another mountpoint
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-04-28 10:25:44 +00:00
John Molakvoæ
cd83345375
Merge pull request #52183 from nextcloud/backport/51020/stable29 2025-04-15 17:00:00 +02:00
Robin Appelman
ba1321adb9 fix: only do cache copy in updater if the parent folder should be in cache
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-04-14 15:24:11 +00:00
Louis Chemineau
2e3cffa473 fix: Transfer ownership with S3 as primary
When using S3 as primary storage, transferring ownership with the `--move` option fail with the following error:

`SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '8-45b963397aa40d4a0063e0d85e4fe7a1' for key 'fs_storage_path_hash'`

The `--move` option moves the entire home folder from one account to another.
The error means that the move failed because the destination folder already exist in `oc_filecache`.

- With S3 as primary storage, folders only exists as entries in `oc_filecache`.
- With S3 as primary storage, `moveFromStorage(...)` only moves the cache entry, as nothing needs to be moved on disk. This cache move does not delete potentially pre-existing destination folder.
- With Local storage, `moveFromStorage(...)` calls `rename(...)` which delete pre-existing folder.

- `transfer(...)`: 687a4d9ac7/apps/files/lib/Service/OwnershipTransferService.php (L112)
- `oneTimeUserSetup(...)`: 687a4d9ac7/lib/private/Files/SetupManager.php (L261-L262)
- `mkdir(...)`: 687a4d9ac7/lib/private/Files/ObjectStore/ObjectStoreStorage.php (L91-L135)
- `moveFromStorage(...)`: 687a4d9ac7/lib/private/Files/ObjectStore/ObjectStoreStorage.php (L635-L636)

Delete pre-existing folder in `moveFromStorage(...)`

Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-04-14 14:14:58 +00:00
Côme Chilliet
f46cd7aaab fix: Fix newly spotted psalm issues, add exhaustive typed magic properties for LDAP classes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-03-24 10:45:21 +01:00
Git'Fellow
52669438a6 fix(files): Make sure file pointer exists
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2025-03-19 23:25:14 +01:00
Marcel Müller
76c1bbf48b fix: No IFactory in constructor
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
2025-03-05 11:41:20 +00:00
Joas Schilling
df1f3c1768 fix(files): Don't do session related work in the constructor of the View
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-03-05 11:41:20 +00:00
John Molakvoæ
ed720978bc fix: psalm and OCP @since declarations
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>

Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
2025-03-04 09:30:42 +01:00
skjnldsv
1672a357bd fix: make sure we process mime extensions as string
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2025-03-04 09:29:12 +01:00
Andy Scherzinger
50d5aede17
Merge pull request #50795 from nextcloud/backport/50781/stable29
[stable29] perf(files): faster query to fetch incomplete directories
2025-02-17 19:15:40 +01:00
Robin Appelman
e020cbbfe7 fix: make locked exception path relative to the view
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-02-15 16:51:00 +01:00
Benjamin Gaussorgues
ce4d271386
perf(files): faster query to fetch incomplete directories
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2025-02-14 11:00:07 +01:00
Louis Chemineau
ef4281ebe3 fix(files): Correctly copy the cache information on copy operations
Needed to copy the `encrypted` flag of encrypted files when those files are two level down in a moved folder.

Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-02-13 23:37:04 +00:00
Robin Appelman
804a0ec567 fix: explicitly ignore nested mounts when transfering ownership
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-02-05 09:39:28 +01:00
Robin Appelman
7a37fdddc5 fix: translate mount move error messages
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-02-05 09:39:28 +01:00
Robin Appelman
5b4ceb0eaa fix: improve checks for moving shares/storages into other mounts
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-02-05 09:39:28 +01:00
Richard Steinmetz
43d4864261 fix(s3): treat empty sse_c_key as not set
Co-authored-by: Christian Becker <christian@dabecka.de>
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2025-01-29 17:33:42 +00:00
Ferdinand Thiessen
3f8244a841 fix(files): Do not array access null value
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-01-29 10:28:01 +00:00
Louis Chemineau
840ee6d59a
fix: Metadata field search
Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-01-27 13:03:49 +01:00
Kate
3fef4b1a4d
Merge pull request #49990 from nextcloud/backport/49887/stable29 2025-01-20 17:28:04 +01:00
Robin Appelman
8744d9e752
chore: psalm fixes
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-01-20 15:31:23 +01:00
Git'Fellow
aeca17c2ac fix(TemplateManager): Remove warning message
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2025-01-20 13:40:34 +00:00
Robin Appelman
43c37426cb
fix: don't skip scanner users filesystem if they have a mountpoint at /<user>/files/
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-01-20 14:27:52 +01:00
Git'Fellow
cf2b197a1f
Merge pull request #49675 from nextcloud/backport/49262/stable29
[stable29] fix: don't do same-storage move optimization with encryption wrappers
2025-01-09 09:50:47 +01:00
Robin Appelman
bb3e6ea9d9 fix: don't do same-storage move optimization with encryption wrappers
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-01-09 09:32:16 +01:00
Git'Fellow
359dc62233
Merge pull request #49655 from nextcloud/backport/48769/stable29
[stable29] Fix incorrect permissions when copying shared files
2025-01-09 07:48:17 +01:00
provokateurin
9a728db531 fix(View): Catch exceptions when executing mkdir for non-existent parents
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-12-17 09:38:46 +00:00
Git'Fellow
c085c1bc45 fix(TemplateManager): Make sure TemplateFolder is a Folder
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2024-12-16 06:04:02 +00:00
John Molakvoæ
c3caf1c6d2
Merge pull request #49654 from nextcloud/backport/49551/stable29
[stable29] fix: don't propagate future mtimes
2024-12-12 13:22:31 +01:00
Robin Appelman
f8ad3d6cc9 fix: fix mimetype not being updated when changing file extention on object store
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-12-11 09:00:37 +00:00
Robin Appelman
cd8694493e fix: use scan_permissions when copying cache items
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-12-09 13:47:27 +01:00
Robin Appelman
fb71c41823 fix: store unmaked source permissions as scan_permissions when loading share cache items
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-12-09 13:47:27 +01:00
Robin Appelman
ef8f2155cb fix: don't propagate future mtimes
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-12-04 19:12:30 +00:00
Robin Appelman
27c04eb682
fix: fix availability wrapper not applying
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-11-26 18:45:52 +01:00
Robin Appelman
d2230f8479
fix: throw correct exception type when we can't verify if an s3 bucket exists
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-11-26 18:45:46 +01:00
Git'Fellow
8ec775bc84 fix(storage): Try to delete existing target
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2024-11-21 07:41:54 +01:00
Josh Richards
ce3cec9681
fix: Clean-up some remaining readdir calls with undesirable false evaluation potential
Signed-off-by: Josh Richards <josh.t.richards@gmail.com>

[skip ci]
2024-11-13 08:34:23 +05:30
Victor Dubiniuk
e9699a5a55 Fix Undefined variable: response notice in case of non-404 error
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-11-08 16:12:15 +00:00
Louis
8b42f46c3d
Merge pull request #48998 from nextcloud/backport/47986/stable29
[stable29] perf(ObjectStoreStorage): Improve (slow) move on same object bucket
2024-10-31 15:55:32 +01:00
Benjamin Gaussorgues
31aa1fe4f5
Merge pull request #48488 from nextcloud/backport/48235/stable29 2024-10-30 09:59:56 +01:00
Christoph Fiehe
68b9972889 perf(ObjectStoreStorage): Improve (slow) move on same object bucket
This commit fixes the issue #47856. When you upload a file into a group folder and when you use a single S3 bucket as primary storage, the final move operation hangs for a long time. In the background, Nextcloud initiates a copy-delete sequence from the bucket into the bucket, with causes a lot unnecessary overhead. Nextcloud thinks that the file must be imported to another storage and does not recognize that everything is done on the same object bucket. In that case, the import step can be completely skipped, which saves time, network bandwidth and reduces the load on the object storage.

The behavior improves a lot with https://github.com/nextcloud/server/pull/46013. However, there are still some put messages that are being sent to the object storage when you use an object storage as primary storage and upload files into a group folder.

Co-authored-by: Kate <26026535+provokateurin@users.noreply.github.com>
Signed-off-by: Christoph Fiehe <c.fiehe@eurodata.de>
2024-10-30 08:28:52 +00:00
Daniel Calviño Sánchez
6f962c75d4 fix: Fix copying or moving from shared groupfolders
When copying or moving between two local storages the source path (on
disk) to copy or move from is got from the unjailed path of the source
storage. However, if the source storage has more than one jail getting
the unjailed path resolves the most external jail, but the source path
needs to be got from the most internal jail instead (the one closer to
the local storage).

This can happen, for example, with a shared groupfolder: in that case
there is an external jail for the shared storage, and one internal jail
for the groupfolder storage wrapped by the shared storage.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2024-10-29 10:41:24 +00:00
Julius Knorr
433f939d43 fix: Allow overriding shouldApplyQuota check from child classes
Signed-off-by: Julius Knorr <jus@bitgrid.net>
2024-10-09 16:43:10 +00:00