nextcloud / nextcloud/server

Transfer ownership specify target folder

Open
#30,764 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

How to use GitHub
  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Is your feature request related to a problem? Please describe.
Some setups are configured in a way where the home directory of a user is read-only, and the actual home data is in a subdirectory, for example "/home" (which sometimes is also an external storage). In such scenarios, transfer ownership would not be able to write into the target user's storage, or even if it could, the user could not delete it due to missing permissions.

Please note that just manually moving the files on-disk and rescanning is not a suitable solution as it would cause metadata loss and is not doable in setups with primary object store.

Describe the solution you'd like
Make it possible to specify the name of the target path in the occ command. That name would override the default one and would create the dir if missing.

Describe alternatives you've considered
Instead of occ command, have this be in config.php. This would fit the above describe scenario but is less flexible.

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

Locate the occ command that performs ownership transfer and read how it determines the target user's storage path. Trace the existing default-path behavior before assessing the requested option. Done means the command accepts a target path name, creates the directory when missing, and supports setups where the default home directory is not writable.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, cli
Issue type
Feature
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.