-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
occ user:delete does not remove storage and files where using Swift as primary store #9690
Comments
Well, when removing record from
then
|
I guess that is missing some parts.
Usually not. This is how to set up a Nextcloud instance with object storage:
<?php
$CONFIG = [
'objectstore' =>
array (
'class' => 'OC\\Files\\ObjectStore\\S3',
'arguments' =>
array (
'bucket' => 'abc',
'key' => '123',
'secret' => 'abc',
'hostname' => '127.0.0.1',
'port' => '4567',
'use_ssl' => false,
'use_path_style' => true,
),
),
];
I hope this helps to resolve your issues. |
I`m not sure if we understand each other. The Swift (not S3) object primary storage works fine. Until user deletion. The problem is that Nextcloud leaves object in database and storage as well. During normal life cycle, when user creates or deletes files, everything is ok - in the database and in the swift storage (=object are created and deleted as well). Only when I delete user (via I do not understand the code to easily find the bug but I think there is something wrong with deleting user when having object storage.... Because user is removed e.g. from |
Okay - that one I clearly misunderstood. @icewind1991 @rullzer Does this ring a bell for you? |
The bug is in
Looks like files are only actually removed when using local storage(!) |
|
I dont know if this is the same issue, but i currently notice the same behaviour with s3 primary storage with Nextcloud 17.0.1 |
Same issue with s3 primary storage with nextcloud v18.0.0 |
Is there any info about the priority? In my opinion this is a very critical bug. It is currently possible to get access to files from previously deleted users. This is a vulnerability! |
Also observing this bug with 18.0.1. It's strange that this is not being dealt with. For now, it seems that we have to settle with mounting the bucket directly. |
This really should be fixed. It's a show stopper for my S3 primary storage plans. I must be able to delete users files. Any ideas on a work-around? |
Came here looking for the same thing as everyone. I've around 9GB of used storage on the WebUI but my S3 Bucket is using 64GB! Which means the files haven't been deleted. I believe this should be dealt with as it is a huge deal breaker for Nextcloud + S3 storage. |
I am on Nextcloud 18.0.3 and deleting the data (not even user) doesn't delete/empty the S3 storage (it has been set as primary storage) |
I tried a workaround on this issue and it seems to work at some level. You need to install Impersonate -app for this to work. When user is to be deleted do following:
|
My issue is mostly on the S3 side where the deleted files don't get removed. |
@cinghaman I was referring to the original issue. Yours seems to be something else. |
Same problem for Nextcloud 18.0.4.2 with \OC\Files\ObjectStore\S3 External storage support version 1.9.0 When user removed all users files still present on storage forever. |
I am still experiencing this for Nextcloud 19.0.4 with OC\Files\ObjectStore\S3 as primary storage, no experience with external storage on Nextcloud. Deleted users still all appear for me in oc_storages, I had never seen that before this thread. If a username is deleted from the webui the files remain in object storage forever. If a user registers an account later, with the same username, that user is granted access to the first user's files immediately. I feel there should be more than username alone to a user account, a truly unique identifier should be used, even just a unique 'userid'. If users are never removed from oc_storages, if the plan was to allow 'recovery' of user accounts then administrators could simply write the original userid to the 'current iteration' of that username. I thought I had problems with versioning and lifecycle policies but I verified some days ago that versions have all finally been actually deleted after marking them so a week ago. I have now migrated everything off this instance, emptying it totally. s3 standard is not cheap. I have another instance identical to the first that uses s3 compatible object storage at Linode where my experience is identical, just cheaper. |
Workaround for nextcloud/server#9690. If users are deleted with files in primary or external object storage, those files will remain there forever.
I have the same issue, even if you remove it directly via the web interface it does the same thing. Can anyone look to fix that? It's really a security issue... |
@rullzer Is there any possibilites that you look at that issue. It's still the case in NextCloud 20, and I think it's really an important security breach. |
Same issue here, maybe add you 👍 to the issue? I don't know how Nc does the prio. |
Steps to reproduce
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:
Delete user:
After delete:
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
The text was updated successfully, but these errors were encountered: