Cannot delete user due to S3 storage policies

Discourse is complaining about existing posts when attempting to delete a user whose only apparent writing interaction with the system was sending a private message asking for the account to be deleted. I’ve deleted that topic, and even then cannot delete the account.

This is how the profile looks like:

Other than the awkward negative topic and posts count, can’t see anything outstanding surrounding the problem.

Maybe it’s the negative count? Where is that kept? Apparently not in users table itself.

2 Likes

The incorrect negative numbers are in the user_stats table, and fixing them by hand still doesn’t allow the account to be deleted. So two independent bugs, apparently.

2 Likes

Do You see Delete Posts Button in the Admin > Users > (Target User) ? Scroll Down to Topics Created and so fields and you’d see a button to delete all topics by a user (including private messages).

Click that and it should probably let you delete the user

or You’d see something like cannot delete posts max post date limit is xx

so you can modify your setting to be … say 360 days and then the button will be automatically enabled.

I cannot see the button. I deleted the one private topic the user had directly in the topic itself. That section looks like:

Are You on the latest Build?

Try visiting {Your Forum URL}/admin/upgrade and upgrade manually?

This is on 1.8.0.beta9… is the fix in beta10, or do I have to go to tests-passed?

Will the fix work even if it says zero posts at the moment?

it was Introduced in Beta 10 but living on the edge is the best possible choice for you, There are a lot of issues in beta 10 addressed in tests-passed.

I’m on 1.8.0 Beta 10 + 150 Right now.

1 Like

Thanks, will update and report back.

Sure! … Will dig into it if I could help in any other way.

also, You may rather not try modifying database as there is a strong chance of things getting messed up in case those entries are saved incorrectly.

I’ve updated to 1.8.10.beta10 +307, and the button doesn’t show up, and I still cannot delete this user.

Going to the activity page shows a bar at the top looking like this:

Going into the deleted posts shows that one private topic that was deleted still, and trying to click any of the :warning: Delete buttons results in the same error still: There was an error deleting that user. Make sure all posts are deleted before trying to delete the user.

Any other ideas?

Found the issue: I was using an IAM policy on Amazon’s S3 that prevented deletes as a safety net, because I assumed image uploads were one-way only. Turns out deleting the user attempts to delete content from S3 as well, supposedly to remove the avatar image? Haven’t confirmed that yet, but logs will show in a short while. The S3 delete error eventually cascaded into the standard and in this case misleading “delete all posts” message.

I’ve now opened up the IAM policy for object deletes on the bucket, but preserved it with object versioning, which implies we still get the safety benefits while allowing deletes to happen.

6 Likes