Occ files:transfer-ownership

I’m new to owncloud administration and in this group, too.

I need to move file ownership from user1 to user2.
There is an occ command to do that. I’ve used it in the past with no problem.
A few week ago, with another user, I had the same error I received today.
I report the command used (1.) and those used to verify that user2 had logged in (2.) as asked and the time (3.) of user2 login and the request event.

Steps to reproduce

  1. root@xxx:/var/www/html/xxx# sudo -u www-data php occ files:transfer-ownership user1 user2
    The target user is not ready to accept files. The user has at least to be logged in once.
  2. root@xxx:/var/www/html/xxx# sudo -u www-data php occ user:lastseen user2
    user2`s last login: 21.11.2022 09:56
  3. root@xxx:/var/www/html/xxx# date
    Mon 21 Nov 2022 12:00:10 PM CET

Expected behaviour

It should move the files from the user1/files folder to the /user2/files folder.

Actual behaviour

I get the reported error and the files are not moved
The target user is not ready to accept files. The user has at least to be logged in once.

Server configuration

Operating system: 3 virtual machine with Ubuntu 20.04.5 LTS updated

  1. frontend were is installed owncloud server;
  2. database were is installed MariaDB;
  3. data esporting data via nfs4.

Web server: apache2/focal-updates,focal-security,now 2.4.41-4ubuntu3.12 amd64 [installed]
Server version: Apache/2.4.41 (Ubuntu)

Database: Server version: 10.3.34-MariaDB-0ubuntu0.20.04.1 Ubuntu 20.04

PHP version: php/focal 2:7.4+75
PHP 7.4.3 (cli) (built: Nov 2 2022 09:53:44) ( NTS )

ownCloud version: (see ownCloud admin page) 10.9.1 (stable)

Updated from an older ownCloud or fresh install: Update from version 10.7 on Ubuntu 20.04.2

Where did you install ownCloud from: script Ansible

Signing status (ownCloud 9.0 and above): No errors have been found.

The content of config/config.php:

List of activated apps:

**Are you using external storage, if yes which one:** no

**Are you using encryption:** no

**Are you using an external user-backend, if yes which one:** LDAP

#### LDAP configuration (delete this part if not used)
<script src="https://gist.github.com/biggoodgiant/3b944720828b600f3f5d7ab3ffde16d8.js"></script>

### Client configuration
**Browser:** Chrome

**Operating system:** Windows 11

### Logs
#### Web server error log
<script src="https://gist.github.com/biggoodgiant/63e2a43af8c1114c9c65260836ef4d69.js"></script>

#### ownCloud log (data/owncloud.log)
<script src="https://gist.github.com/biggoodgiant/8e8bbbd20b2a9ee59b4faebeb61032ba.js"></script>

#### Browser log

I think the message reported is somewhat misleading. The warning you get is because the encryption module is not ready for the destination user.

Do you by chance see a log entry similar to Installation is in transit between the old Encryption (ownCloud <= 8.0) and the new encryption... when running the files:transfer-ownership occ command?

Good morning.
You are right.
Indeed, exactly the message you reported appears. But we never turned on encryption.

As you can see, the system itself suggests turning on the encryption module… Does this mean that the whole disk will be encrypted?

Hi, it is possible that you at some point in the past enabled the encryption app but never finished the process of activating the needed module and encrypting users files so that you are now in this kind of transition state.

You could try to run the occ command config:app:delete files_encryption installed_version. This will delete the entry related to the encryption app from the oc_appconfig table. And then retry to launch the files:transfer-ownership occ command.

1 Like

Thank you very much!
I will try in a few minutes.

It worked!
Thank you very much.


Cool, thanks for the feedback.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.