Skip to content

occ user:delete does not remove storage and files where using Swift as primary store #9690

@vpecinka

Description

@vpecinka

Steps to reproduce

  1. Set up Nextcloud using Swift as a primary storage
  2. Login as admin and create user (e.g. tester)
  3. Login as tester and add some files (for sure, there are the default ones)
  4. As www-data user run cmd: php occ user:delete tester

Expected behaviour

The user and its oc_storage and oc_filecache should be deleted

Actual behaviour

The users is deleted, however the oc_storages and oc_filecache stil remain, together with files in the object storage.

Pre conditions:

MySQL [nextcloud_v13]> select * from oc_storages;
+------------+---------------------------------------------------+-----------+--------------+
| numeric_id | id                                                | available | last_checked |
+------------+---------------------------------------------------+-----------+--------------+
|          1 | object::store:nc0                                 |         1 |         NULL |
|          2 | object::user:admin                                |         1 |         NULL |
|          4 | object::user:775DA7E6-9157-48EE-92AD-DE87D45E22F1 |         1 |         NULL |
|          5 | object::user:tester                               |         1 |         NULL |
+------------+---------------------------------------------------+-----------+--------------+
5 rows in set (0.01 sec)

Delete user:

www-data@9264da61a860:/www/nextcloud$ php occ user:delete tester
The specified user was deleted

After delete:

MySQL [nextcloud_v13]> select * from oc_storages;
+------------+---------------------------------------------------+-----------+--------------+
| numeric_id | id                                                | available | last_checked |
+------------+---------------------------------------------------+-----------+--------------+
|          1 | object::store:nc0                                 |         1 |         NULL |
|          2 | object::user:admin                                |         1 |         NULL |
|          4 | object::user:775DA7E6-9157-48EE-92AD-DE87D45E22F1 |         1 |         NULL |
|          5 | object::user:tester                               |         1 |         NULL |
+------------+---------------------------------------------------+-----------+--------------+
5 rows in set (0.00 sec)

MySQL [nextcloud_v13]> select count(*) from oc_filecache where storage=5;
+----------+
| count(*) |
+----------+
|       22 |
+----------+
1 row in set (0.00 sec)

Server configuration

Operating system: Linux Debian 9.4
Web server: Nginx 1.10.3
Database: MySQL
PHP version: 7.0
Nextcloud version: (see Nextcloud admin page) 13.0.1.1
Updated from an older Nextcloud/ownCloud or fresh install: either
Where did you install Nextcloud from: tarfile from nextcloud.com
Are you using external storage, if yes which one: Swift as primary
Are you using encryption: no
Are you using an external user-backend, if yes which one: LDAP but same problem with local user

Nextcloud log (data/nextcloud.log)

Nextcloud log
{"reqId":"6RvewTtNcUFNNlCSEPaR","level":3,"time":"2018-05-28T14:35:45+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Undefined offset: 1 at \/www\/nextcloud\/apps\/admin_audit\/lib\/Actions\/Console.php#32","userAgent":"--","version":"13.0.1.1"}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions