Intranet search engine. Users should only see results they have access to.

Posted on 2004-12-01
Last Modified: 2010-04-01

I'm working on a little search engine project. The search engine should indicate all files (through a samba share) stored in the file server (Linux). The users (WinXP/Linux) should have the ability to search in this index via a JSP. After the search is complete, the users get a list with some links, so they are able to access the files with just a klick on it. But, of course, the users should only receive links of files they have access to. And exactly this is my problem. How is it possible to check the file permissions?
Is it possible to use WebDAV?
Should I use some C funtions and JNI?

Every suggestion is welcome.

Question by:muetze303
    LVL 4

    Accepted Solution

    I would to a Runtime.getRuntime().exec("ls -al") in the correct directory and parse the Process's InputStream for the User and Group permissions for that file, compare them to the user requesting the file and weed out the invalid or not permitted files.


    Author Comment

    Thanks a lot for your help. I thinks it is not the most elegant solution, but it works just perfect.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    xjc and jaxb 2 85
    oracle fusion vs MQ 2 75
    main method of string class 3 64
    Books that can get me started on JAVA 2 34
    It can often be challenging to stay relevant in the rapidly evolving world of technology. This can make recruiting talent difficult for companies of all sizes.
    If you're not part of the solution, you're part of the problem.   Tips on how to secure IoT devices, even the dumbest ones, so they can't be used as part of a DDoS botnet.  Use PRTG Network Monitor as one of the building blocks, to detect unusual…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now