How to Transfer Ownership of Shared Files in ownCloud Server

A colleague leaves, a project moves to another team, or a shared folder still belongs to an account that is about to be disabled. The files may appear in the recipient’s ownCloud view, yet the recipient may only have access through a share. If the original account is removed, that distinction can become a problem.

For ownCloud Server 10.x, an administrator can transfer ownership with the command-line tool occ files:transfer-ownership. There is no user-facing “Make me the owner” button described in the Server 10.16 documentation. The command moves files owned by one account and its outgoing shares to another account; incoming shares are not transferred. The steps below use the current ownCloud Server 10.16 command reference. Check the documentation for the exact release and storage configuration you run before executing an ownership change.

First, identify what needs to move

“Shared with me” does not necessarily mean “owned by me.” In ownCloud, the account that created or owns a file can share it with other users. A recipient may be able to read or edit the shared item without owning it. If you are the recipient, asking the original owner or an administrator to move the item is usually the right next step.

The transfer command is an administrator operation on the ownCloud Server host. It can move every file owned by a source user, or a selected folder and its contents. The selected path must exist inside that user’s files directory. It does not transfer incoming shares, trash bin contents, or older file versions. The official ownCloud Server 10.16 OCC command reference documents the command and its options.

This guide covers ownCloud Server (the classic 10.x product). ownCloud Infinite Scale is a different product with a different architecture and user interface. Do not assume this Server command or its results apply to an Infinite Scale deployment; confirm the documentation for your installed product.

Choose the right transfer scope

NeedApproachWhat to keep in mind
Move one project folderUse --path with a path relative to the source user’s files directory.The folder and its descendants are placed in a timestamped transfer folder for the recipient.
Move all files owned by an accountRun the command with only the source and destination user IDs.Outgoing shares move with the files; incoming shares do not.
Retire an accountTransfer first, verify the result, then follow your organization’s account-removal process.Do not disable or delete the source account until the needed data and shares have been checked.
Move files directly into a new user’s top-level files areaConsider --destination-use-user-folder only for its documented special case.The destination account must exist and must never have logged in. This is not the normal selective-transfer workflow.

Before you run the command

  1. Confirm the product and version. Verify that this is ownCloud Server 10.x, not ownCloud Infinite Scale, and read the command reference for the installed release.
  2. Confirm both account IDs. Use the actual ownCloud user IDs, not display names or email addresses unless those are the IDs. Check spelling carefully: source and destination are positional arguments.
  3. Review the share impact. The command can move outgoing shares belonging to the source account. Incoming shares are excluded. Tell collaborators about any expected ownership or access change.
  4. Make and verify a backup. Follow your site’s normal backup procedure for the database and data storage. A file transfer changes ownership and share relationships; a recoverable backup is the safer rollback plan.
  5. Check storage and deployment details. Confirm the ownCloud installation directory and the correct web-server account. On a standard Linux installation that account is often www-data, but packages and containers can differ.

If you use S3-compatible primary storage with multiple buckets, stop and review the storage-specific warning in the official ownCloud S3-compatible primary storage documentation. It says ownership transfer is not recommended in that arrangement because shares can be lost.

Transfer a selected shared folder

Use a selective transfer when the destination needs a project or a small set of files, rather than the source user’s entire file collection. The example below transfers a folder called Projects/Proposal from user ID alice to user ID bob.

  1. Open a shell on the ownCloud Server host and go to the directory containing the occ script. Use the path that matches your installation.
  2. Check the command’s options before running it:
sudo -u www-data ./occ files:transfer-ownership --help
  1. Run the selective transfer. The example path is relative to alice’s ownCloud files directory; it is not a server filesystem path:
sudo -u www-data ./occ files:transfer-ownership \
  --path="Projects/Proposal" \
  alice \
  bob

Replace www-data if your installation uses a different service account. In a container deployment, use the container’s documented command form rather than copying the host command literally. The ownCloud developer documentation, for example, shows a Docker Compose form such as docker compose exec owncloud occ ...; service names vary by deployment.

The command places the selected folder and its contents in the destination user’s files area under a folder named in the pattern transferred from alice on [timestamp]. It does not preserve the original top-level location as-is. Check the destination account for this transfer folder after the command completes.

Transfer everything owned by one account

If the user is leaving and the goal is to move all of their owned files and outgoing shares, omit --path:

sudo -u www-data ./occ files:transfer-ownership \
  alice \
  bob

Read the confirmation output before accepting it. The command may report shares that cannot be transferred. The --accept-skipped-shares option tells ownCloud to continue when shares are skipped; use it only when you understand and accept that outcome. Do not add it merely to suppress a prompt.

There is also a --destination-use-user-folder option for a specific full-user migration case. The destination user must be created but must never have logged in; ownCloud recommends maintenance mode for that operation. Because it has a stricter prerequisite and changes where the data lands, do not use it for an ordinary handoff or selective move.

Verify the result and address skipped shares

  1. Sign in as the destination user, or ask them to check their Files area. For a selective transfer, confirm the timestamped transferred from … folder and open representative files.
  2. Check that the expected folder structure and latest file contents are present. The Server 10.16 command reference states that file versions are not transferred; only the latest version appears in the destination account.
  3. Review important shares with the people who rely on them. Since outgoing shares move but incoming shares do not, a transfer does not make the destination account a recipient of every item that had been shared with the source.
  4. Keep the source account available until the destination owner and affected collaborators confirm access. Complete account deactivation only after that check and your normal retention review.

If the transfer reports an exception or ends prematurely, ownCloud documents files:troubleshoot-transfer-ownership for checking transfer-related problems. Its default behavior is a dry run that reports findings. For example:

sudo -u www-data ./occ files:troubleshoot-transfer-ownership --uid bob

Review its output first. The command also has a --fix option to attempt repairs, so do not add that option without reviewing the reported issues and having a current backup. The available checks and options are listed in the same official OCC reference.

Final self-check

  • Did you use the correct ownCloud Server instance, version, source ID, and destination ID?
  • Did you choose the intended scope: a path, or all files owned by the source?
  • Did you account for skipped outgoing shares, incoming shares, trash bin contents, and older versions?
  • Can the destination user find and open the transferred files, and can affected collaborators still reach what they need?
  • Have you kept a verified backup and delayed account removal until the handoff is confirmed?

A successful command is only the start of the handoff. Confirm the new location, file contents, and collaboration access before treating ownership transfer as complete.

Leave a Comment

7 Best WSUS Tools for Update Management and Troubleshooting

7 Best WSUS Tools for Update Management and Troubleshooting

Compare seven tools that support or complement WSUS, from Microsoft’s native console and diagnostics to third-party patch publishing and remote deployment.

Best Windows System Monitoring Tools: 6 Picks for Server Visibility

Best Windows System Monitoring Tools: 6 Picks for Server Visibility

Compare six Windows system monitoring tools for server health, application visibility, and alerting, with current notes on deployment and licensing.

7 Wake-on-LAN Tools: What’s Still Available From the 2021 List

7 Wake-on-LAN Tools: What’s Still Available From the 2021 List

Compare seven Wake-on-LAN tools by features and availability, including free utilities, network-admin suites, and 2021 picks that have since been retired.

9 Best Ping Tools for Testing Latency and Scanning a Network

9 Best Ping Tools for Testing Latency and Scanning a Network

Compare nine ping tools for quick reachability checks, subnet discovery, TCP tests, and latency monitoring, with guidance on which one fits your network task.

Best TFTP Servers for Windows, Linux, and macOS

Best TFTP Servers for Windows, Linux, and macOS

Compare the best TFTP servers for Windows, Linux, and macOS, including SolarWinds, Tftpd64, tftpd-hpa, atftpd, haneWIN, and dnsmasq.

5 Best Microsoft Access Alternatives for Desktop and Web Databases

5 Best Microsoft Access Alternatives for Desktop and Web Databases

Compare five Microsoft Access alternatives for desktop, SQLite, no-code, and browser-based database work, with strengths, limits, and best-fit use cases.

Open-Source vs. Closed-Source Monitoring Tools Compared

Open-Source vs. Closed-Source Monitoring Tools Compared

Compare open-source and closed-source monitoring tools by cost, support, customization, security, and current options including Zabbix, Nagios, PRTG, and more.

Ingress vs. Egress: What’s the Difference in Networking?

Ingress vs. Egress: What’s the Difference in Networking?

Understand how ingress and egress describe incoming and outgoing traffic, why direction depends on the network boundary, and how to monitor bandwidth and spot risky data transfers.

6 Best Free Syslog Servers to Try for Centralized Logging

6 Best Free Syslog Servers to Try for Centralized Logging

Compare six free syslog servers and collectors for Windows and Linux, including GUI tools, open-source options, search, alerting, and secure transport.

What Is IIS? Microsoft’s Windows Web Server and Alternatives

What Is IIS? Microsoft’s Windows Web Server and Alternatives

See what Microsoft IIS does, how its request pipeline and application pools work, and when Apache, NGINX, or Caddy may fit your web server needs better.