Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: Rick53 on December 27, 2022, 07:03:57 AM

Title: Large files in the Attachments folder
Post by: Rick53 on December 27, 2022, 07:03:57 AM
My forum has existed for many years. At that time there were generous restrictions on the size of a post attachment. I changed these restrictions at some point.

In the "Attachments" directory I still see some very large older pictures from earlier times. These are saved as a DAT file. I found the relevant posts and deleted the image using edit mode.

However, after two weeks, the files (".dat") are still in the "Attachments" folder. Will they fall out by themselves at some point, or do I have to delete them manually?

Theme: Curve2
SMF 2.1.3
Title: Re: Large files in the Attachments folder
Post by: Sir Osis of Liver on December 27, 2022, 04:25:09 PM
All attachments in 2.1 have .dat extension.  That was added to address a problem with FileZilla.  If you upgraded from 2.0 or earlier version, the extension was added to existing files by upgrader.
Title: Re: Large files in the Attachments folder
Post by: Rick53 on December 31, 2022, 02:45:35 AM
Thank you. But that doesn't solve my question. File attachments were regularly deleted in the post. But I can still see the relevant attachments with Filezilla in the Attachments folder. A total of about 1 GB! Can I delete these attachments manually? Or is there an SMF internal recommended way to delete it?
Title: Re: Large files in the Attachments folder
Post by: Aleksi "Lex" Kilpinen on December 31, 2022, 03:02:44 AM
I do think removing the attachments should fairly immediately delete the associated .dat files as well,
but there's a chance that there might be a permission issue preventing SMF from actually doing that.

I've seen that happen before, where the server configuration has changed over time, leaving files on the server that are no longer modifiable for PHP. You should however be safe to try and make a backup copy of the file (just in case) and delete it manually if you are able. If you are unable to though, you may need to ask your host to check and fix ownership of the file.