nextcloud / nextcloud/server

[Bug]: `transfer:ownership` ends up with files inaccessible via Web UI for Object Storage

Open
#48,463 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 29-feedback bug feature: files feature: object storage
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

⚠️ This issue respects the following points: ⚠️
Bug description

After transferring ownership of files (if Object storage is configured as primary), they do not appear in web-interface. Though outgoing shares still can be discovered via Shares => Shared with others

Steps to reproduce
  1. Configure object storage to be used as primary (reproduced with Minio)

As user1

  1. make outgoing shares with different users (user2, user3, e.t.c)
  2. move one of the shared files to trashbin
  3. transfer files to one of these users (e.g. user2)

occ -v files:transfer-ownership --transfer-incoming-shares=0 --path "/" user1 user2

image

see output:

Validating quota
Analysing files of user1 ...
4 [============================] 1 sec
Collecting all share information for files and folders of user1 ...
4 [============================] < 1 sec
Transferring files to user2/ ...
Restoring shares ...
1/4 [=======>--------------------] 25% < 1 sec
Share with id 1 points at deleted file, skipping
Share with id 3 points at deleted file, skipping
4/4 [============================] 100% < 1 sec

image

in oc_filecache see that parent set to -1 for all transferred files
image

Expected behavior

parent should be === fileid of directort specified during tranfer => user2/files in example

Nextcloud Server version

29

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Apache (supported)

Database engine version

MySQL

Is this bug present after an update or on a fresh install?

Updated from a MINOR version (ex. 28.0.1 to 28.0.2)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?
  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other
Configuration report

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the occ files:transfer-ownership command and trace how transferred files are recorded in oc_filecache when primary object storage is configured. Reproduce the transfer with Minio using the stated steps, then inspect the parent values and web-interface visibility. Done means transferred files use the user2/files directory as their parent and appear in the Web UI.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, php
Domain
backend, database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.