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


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.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
muetze303Author Commented:
Thanks a lot for your help. I thinks it is not the most elegant solution, but it works just perfect.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.