[Bug]: `transfer:ownership` ends up with files inaccessible via Web UI for Object Storage
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
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
- Configure object storage to be used as primary (reproduced with Minio)
As user1
- make outgoing shares with different users (user2, user3, e.t.c)
- move one of the shared files to trashbin
- transfer files to one of these users (e.g. user2)
occ -v files:transfer-ownership --transfer-incoming-shares=0 --path "/" user1 user2
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
in oc_filecache see that parent set to -1 for all transferred files
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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