Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

tomcat - hide files and directories that start with "." on windows

Posted on 2011-05-03
10
Medium Priority
?
354 Views
Last Modified: 2012-05-11
I have tomcat 5.5 running under windows. It will deliver files/folders that start with a ".". How can I prevent this?
0
Comment
Question by:modsiw
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 16

Expert Comment

by:Bryan Butler
ID: 35516880
I don't think there's an easy way to do this.  If it was an extension, there are config options for that, but to ignore files that start with "." is not a usual thing.  If you new the complete filenames, then that would be easy.  Or you could create a script to add all the .* files to the config, but it would be static and need updated anytime files changed.  Of course you can hide all files by turning directory browsing off.  
0
 
LVL 16

Expert Comment

by:Bryan Butler
ID: 35516889
Also, unix systems ignore filenames that start with "." by default.  
0
 
LVL 3

Author Comment

by:modsiw
ID: 35516968
Unfortunately the files & directories that need to be hidden are predictable. (eg, folders name .svn)
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Author Comment

by:modsiw
ID: 35516979
>>Also, unix systems ignore filenames that start with "." by default.  
yep, stuck in windows though
0
 
LVL 92

Expert Comment

by:objects
ID: 35517376
> (eg, folders name .svn)

you shouldn't be deploying those in the first place

Are the .files actually needed?  If not then just don't deploy them
0
 
LVL 3

Author Comment

by:modsiw
ID: 35517636
In some cases they are. There are configuration files for the app its self.

Yes, I know that its bad form in the first place and actions are underway to fix it, eg war files. But as a stop gap measure, hiding them would be nice.
0
 
LVL 28

Expert Comment

by:rrz
ID: 35573102
>There are configuration files for the app its self.
Put them into your web app's WEB-INF folder.  They won't be seen be browser there.
0
 
LVL 3

Author Comment

by:modsiw
ID: 35573642
>Put them into your web app's WEB-INF folder.  They won't be seen be browser there.
Not an option. They have to be in the same directory as the .jsp pages .

Again, we have a proper long term solution. Just looking for a stop-gap.
0
 
LVL 28

Expert Comment

by:rrz
ID: 35595358
>They have to be in the same directory as the .jsp pages .  
Are the JSPs using the files ?
Please post an example showing how the files are called.

0
 
LVL 16

Accepted Solution

by:
Bryan Butler earned 2000 total points
ID: 35689810
If they are know the full names, then you can probably do it.

  from:  http://httpd.apache.org/docs/2.0/mod/mod_autoindex.html
The IndexIgnore directive adds to the list of files to hide when listing a directory. File is a shell-style wildcard expression or full filename

Here's another but just talks about extensions.
http://www.cyberciti.biz/faq/apache-web-server-prevent-directory-folder-listing/
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month13 days, 13 hours left to enroll

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question