S3 Bug - Deleted User

BulkBear

New Member
Nov 13, 2020
8
2
3
Sorry, I'm putting my ISTQB hat on :)

It would appear that if an active user has uploaded some files, which are stored in S3, if the user is deleted then the files are not removed.

To re-create this:
Create a user
Upload some files (stored on S3)
Files appear in S3
Use admin control panel to delete the user
Message appears "User 'kkt8ozcec' and all associated data removed."
Check Manage Files, no files appear
Check S3, file still exist

I don't know if this happens for other file systems too, but I have only tried this on S3.


P.S. Do you need a tester? I'm available? :)
 
  • Like
Reactions: adam

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
Thanks for the feedback. Did they not get added to the file action queue? Normally after a file is removed they're added to a queue which is then processed via a cron task. Saves making the user wait around for the action. You can see the file action queue via the admin area.
 

BulkBear

New Member
Nov 13, 2020
8
2
3
They were not added to the queue.

I repeated this twice to double check, nothing happens.
 

BulkBear

New Member
Nov 13, 2020
8
2
3
Adam,

It might be worth implementing some kind of "report" which runs (daily/weekly/monthly) to look for orphan files on the storage platform(s), as orphan files would be taking up storage for no reason. In theory it shouldn't ever be needed, but it's a nice reassurance to have.
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
They were not added to the queue.

I repeated this twice to double check, nothing happens.
Thanks, I'll ensure it's looked at for the next release.

It might be worth implementing some kind of "report" which runs (daily/weekly/monthly) to look for orphan files on the storage platform(s), as orphan files would be taking up storage for no reason. In theory it shouldn't ever be needed, but it's a nice reassurance to have.
There's a cli script in the codebase which will do this. It's not a report but it doesn't flag any orphaned files and could probably be piped to email.
 

BulkBear

New Member
Nov 13, 2020
8
2
3
Good to know :)

I believe the bulk file delete has a similar problem....

Selecting a file then "Remove Files" - This works fine

Selecting a file then "Delete Files and Stats Data" - Adds to the queue, queue completes, files remain in S3.

626

627


$2 off for every bug I find? :D
 
  • Like
Reactions: adam