Why are empty index.htm files in folders?

Do not post support requests, bug reports or feature requests. Discuss phpBB here. Non-phpBB related discussion goes in General Discussion!
Suggested Hosts
SGvagon
Registered User
Posts: 14
Joined: Sat May 02, 2020 9:57 pm

Why are empty index.htm files in folders?

Post by SGvagon »

Hello,

why are in some folders of phpbb empty index.htm files? Can I remove them without any issues? I have installed Error page mode, so if these empty index.htm files only for protect before indexing these folders, I have 403 error for this.

Thank you in advance.
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 6692
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.

Re: Why are empty index.htm files in folders?

Post by thecoalman »

It's a minor security enhancement. For example if you tried example.com/files/ the .htaccess file will prevent access to that folder and they should get 403 forbidden, it's unlikely but that can fail.

That's where index.htm comes in. There is configuration in Apache that allows listing the files when accessing a directory which is usually turned off. It's nice feature for basic file links because HTML is generated by Apache. Here is example of it turned on:

https://download.phpbb.com/pub/release/

There is also configuration for default file when accessing a directory, usually (index.php index.html index.htm etc.). The default file overrides listing the files as long as one of those files is present, index.htm is served instead of listing the files.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
SGvagon
Registered User
Posts: 14
Joined: Sat May 02, 2020 9:57 pm

Re: Why are empty index.htm files in folders?

Post by SGvagon »

Yes, I want 403 Error page instead of blank index.htm (ex. https://manhetn.info/poradna/download/ ) . My hosting provider have already set 403 for folders without index. So, the solution is detele those index.htm files, or set .htaccess file for all folders?
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 28953
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier

Re: Why are empty index.htm files in folders?

Post by Paul »

The default htaccess should already prevent you from accessing those directories, and result in a 403. The index.htm files are there pure as backup in case htaccess is disabled.
For example, see http://area51.phpbb.com/phpBB/cache/ this result in a 403, because the htaccess is available.

Return to “phpBB Discussion”