nextcloud / nextcloud/server

🗑️ Make occ maintenance:repair fix ghost files in trash bin

Open
#58,410 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage enhancement feature: filesystem feature: trashbin
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

[!TIP]

Help move this idea forward
  • Use the 👍 reaction to show support for this feature.
  • Avoid commenting unless you have relevant information to add; unnecessary comments create noise for subscribers.
  • Subscribe to receive notifications about status changes and new comments.

Is your feature request related to a problem? Please describe.
I once lost my data dir, fortunately, I was able to recover my instance from this, but recently I noticed ghost files in the trash bin.

Describe the solution you'd like
Make the command occ maintenance:repair check for ghost files in the trash bin and fix them.

Describe alternatives you've considered
No commands that i found fix it, so I'd have to empy the trash bin folder and remove all of thefile entrys from the db, and I don't really want to do that.

Additional context
None

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 maintenance:repair command and trace how the trash bin's filesystem entries and database records are currently handled. Reproduce a ghost-file case using the data directory and database, then verify that repair detects and fixes the inconsistency without requiring manual trash-bin deletion.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.