Missing Attachments

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
htmanning
Registered User
Posts: 96
Joined: Sun Jan 26, 2003 2:51 am

Missing Attachments

Post by htmanning »

I'm running 3.2.7.

All of a sudden users report older attachments are gone. For some reason image files are still there, but other attachments are simply not linked in the post. The filename is still printed in the post but with no link. This affected posts between July 27 - September 17. No other posts were affected and we made no updates or changes to the site at all.

I find nothing in the logs about it and don't even know where to start. Any ideas?

I should note the missing attachments do not show up in orphaned attachments. There are attachment files during that time period in the /files directory, but no attachments show up in the Admin section under attachments.

Here is an example of the code that comes up when I edit one of the posts with the missing attachment link:
Screen Shot 2020-10-14 at 11.14.11 AM.png
As you can see above, the code is there but neither file is linked to anything when viewing the post. Again, this only affects posts during a specific 6 week time period. I'm stumped.
User avatar
janus_zonstraal
Registered User
Posts: 4856
Joined: Sat Aug 30, 2014 1:30 pm

Re: Missing Attachments

Post by janus_zonstraal »

Are the in the files folder?
Sorry! My English is bat ;) !!!
htmanning
Registered User
Posts: 96
Joined: Sun Jan 26, 2003 2:51 am

Re: Missing Attachments

Post by htmanning »

I don't know because all the files in the files folder have random or hashed names.
User avatar
janus_zonstraal
Registered User
Posts: 4856
Joined: Sat Aug 30, 2014 1:30 pm

Re: Missing Attachments

Post by janus_zonstraal »

The date from the file and from the post is normally the same.
Sorry! My English is bat ;) !!!
User avatar
warmweer
Jr. Extension Validator
Posts: 5558
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium

Re: Missing Attachments

Post by warmweer »

janus_zonstraal wrote:
Thu Oct 15, 2020 8:56 pm
The date from the file and from the post is normally the same.
In most cases yes (and that 's actually a a good point you made that can help in finding which attachment belongs to which post)
There will a a couple of mismatches when post editing is allowed and attachments are deleted or replaced, or completely new ones uploaded, but that should be minimal.
If the board as a whole was reuploaded at one time or another and copying was not done with keeping the datetime of files, then it's bugger :(
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.
htmanning
Registered User
Posts: 96
Joined: Sun Jan 26, 2003 2:51 am

Re: Missing Attachments

Post by htmanning »

I still have no explanation for why these attachments went missing. There is no evidence of a hack. Nothing is in the moderators, admin, or user logs that indicate the attachment was removed. The logs don't indicate edits so I'm wondering if perhaps someone edited these posts and the attachments were accidentally deleted.
User avatar
janus_zonstraal
Registered User
Posts: 4856
Joined: Sat Aug 30, 2014 1:30 pm

Re: Missing Attachments

Post by janus_zonstraal »

We don't ask the questions for fun, if you answer the questions we can maybe found the cause.
Sorry! My English is bat ;) !!!
htmanning
Registered User
Posts: 96
Joined: Sun Jan 26, 2003 2:51 am

Re: Missing Attachments

Post by htmanning »

I'm pretty sure the files are NOT in the /files directory. I have checked some of them but because they were not my attachments I don't know for sure. I know there are no files in the /files directory that match the post numbers so I don't believe they are there.
User avatar
janus_zonstraal
Registered User
Posts: 4856
Joined: Sat Aug 30, 2014 1:30 pm

Re: Missing Attachments

Post by janus_zonstraal »

Maybe the member(s) delete there attachments?
See ucp.php?i=ucp_attachments&mode=attachments
Sorry! My English is bat ;) !!!
htmanning
Registered User
Posts: 96
Joined: Sun Jan 26, 2003 2:51 am

Re: Missing Attachments

Post by htmanning »

No, the members are the ones who reported it and they thought the admins did something.

- There is no evidence of a hack, but I have reset the database password as well as all moderators and admin password.
- The moderator, user, and admin logs show nothing relating to the affected posts.
- In most cases, the code still exists in the post but there is no link to the attachments.

My best guess is perhaps someone tried to edit a post and a bug caused the link not to be saved, but that's just a guess because I can find no evidence of anything at all.

I am having them check the link you provided to see if the attachments are still listed. We shall see.
User avatar
janus_zonstraal
Registered User
Posts: 4856
Joined: Sat Aug 30, 2014 1:30 pm

Re: Missing Attachments

Post by janus_zonstraal »

How many attachments are in the file folder, some host has restrictions on the number of files in a folder.
Sorry! My English is bat ;) !!!
htmanning
Registered User
Posts: 96
Joined: Sun Jan 26, 2003 2:51 am

Re: Missing Attachments

Post by htmanning »

There are 6377 files in the file folder. Server company says there is no limit for no. of files in a directory.

I confirmed the users do not have the attachments listed in the User Control Panel Overview tab so the attachments were definitely deleted from the /files folder.
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 4142
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Missing Attachments

Post by thecoalman »

htmanning wrote:
Sat Oct 17, 2020 7:53 am
I know there are no files in the /files directory that match the post numbers so I don't believe they are there.


The prefix on the attachment files is the user ID, there is no way to determine what post they were made to from the file name. As already suggested the file date can be matched to the post date.

Were you running version 3.2.2 when this occurred? There was bug deleting attachments if you used preview.

viewtopic.php?f=556&t=2453846
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
htmanning
Registered User
Posts: 96
Joined: Sun Jan 26, 2003 2:51 am

Re: Missing Attachments

Post by htmanning »

Thanks @thecoalman. I was running 3.2.7 when it happened. The forum has been running smoothly on 3.2.7 since 2019 and I have made no changes to the server at all. I'm still on PHP 7.2 and pnpBB 3.2.7 with no other issues.

The forum is pretty busy so we have multiple attachments each day. I grabbed all the files for the particular date and tried to view them. I sent them to the original posters for review and they were NOT the files they posted that were removed. The bottom line is some attachments were deleted while others were left alone. It looks like image files like .jpgs were left alone while .zip files were removed.

I thought I had found a pattern where a post in a topic was deleted by a moderator and then an attachment in another post in the same topic got deleted with it, but it's not consistent. I don't think that's what happened.

This is a very weird issue and I'm beginning to think something else may have deleted the files outside of phpBB. Maybe a malware scan? My server guys swear there's no way that can happen but I'm completely stumped.
bikeridr
Registered User
Posts: 9
Joined: Wed Oct 14, 2020 9:19 pm

Re: Missing Attachments

Post by bikeridr »

htmanning wrote:
Thu Oct 15, 2020 8:36 pm
I don't know because all the files in the files folder have random or hashed names.
You will find the real file names inside the table phpbb_attachments along with the hash string-name. Then you might be able to see if the files attached are corrupt or missing.
Post Reply

Return to “[3.2.x] Support Forum”