image files uploaded, but directory only contains DAT files

Have the feeling that everybody is staring at you in the other forums? Then look here, in this forum nobody does care what you say ;-)

Moderator: Project members

Post Reply
Message
Author
brynn
500 Command not understood
Posts: 2
Joined: 2023-12-19 06:39

image files uploaded, but directory only contains DAT files

#1 Post by brynn » 2023-12-19 08:31

Hi Friends,
I hope this is not one of those dreaded questions that you get constantly. I have searched in all the recommended places, and either I did not understand the search results, or I didn't find the answer. Actually I did find one similar message in your forum, but it looks like the op disappeared before they found the answer.

I am not the server owner, but I'm a co-admin of our forum. The server holds the whole website, but for security purposes, we thought it was better for me to only have access to the forum files on the server. We have an SMF forum, with a server format that looks something like this:

smf forum
- attachments
- avatars
- cache
- custom avatars
- Packages
- Smileys
- Sources
- Themes

All the files that we've uploaded to the attachments folder, were image files uploaded as PNG or JPG or PDF, possibly some other image formats, like GIF. However, I've just gotten access to the forum part of the server, through FileZilla, and I noticed that all the files in the attachments folder or directory have a DAT extension. There is not a single image extension.

However, in other image directories, such as avatars or Smileys, they all have the appropriate image extensions, such as PNG, JPG, GIF, whatever. I've been looking everywhere I can find in FZ, to compare the different directories, to try and find a clue.

The only thing I've noticed so far, is that the attachment dirs have a file called .htaccess. But the avatars and Smileys dirs do not have such a file.
I've looked up .htaccess in Wikipedia, but I don't really understand what it means, relative to either the attachments directory or the image files.

Also I looked up what the DAT extension means, which is 'proprietary data'. So that makes me wonder if SMF might not have been installed correctly. Although I should say that the images are displayed in the forum exactly like we expect, and the forum functions properly in every way we've tested it.

Can anyone answer any of this? If it's a very common question, I apologize, and I really appreciate your patience. Thank you very much :D

User avatar
boco
Contributor
Posts: 26861
Joined: 2006-05-01 03:28
Location: Germany

Re: image files uploaded, but directory only contains DAT files

#2 Post by boco » 2023-12-19 12:00

Forum attachments are usually not saved with their true name and extension (which may be forbidden in the server). They will be renamed, or even re-packaged, by the forum software. SMF (successor of YaBB SE) seems to use the .DAT extension. PHPBB (the forum used here) does not use any extension, even.

So, from what I know, working as intended. Don't expect user attachments to be saved as raw data, as that could be manipulated and put false blame on users. Attachments are protected by the forum software, maybe there is a feature to export/import attachments in the forums's backend?
The other directories are part of the forum software and not obfuscated, as they are loaded as resources directly at runtime.

.htaccess (and a blocker index.php file) further protect that directory from browsing and stealing through link forging. .htaccess contains access rules, and the index.php prevents browsing/indexing by the browser.

Note that .htaccess is deprecated, that's regulated by server directives, these days.
### BEGIN SIGNATURE BLOCK ###
No support requests per PM! You will NOT get any reply!!!
FTP connection problems? Please do yourself a favor and read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
### END SIGNATURE BLOCK ###

brynn
500 Command not understood
Posts: 2
Joined: 2023-12-19 06:39

Re: image files uploaded, but directory only contains DAT files

#3 Post by brynn » 2023-12-24 19:15

Oh, I see....

Well thanks for the info. Even though it's nothing to do with FZ, I appreciate your time and attention.

Yes, SMF provides access to the attachments. I was just looking to download them from the server, because I thought they would be there. As I'm constantly learning more and more about the internet, whenever I see something confusing on my website, I look to the server as kind of the truth test, for what actually is supposed to be there. From there, I have to figure out whether the problem is coming from html or php. So I will keep on learning!

Thanks again for taking the time to explain. I really appreciate it :D

Post Reply