Searching fileshares with SharePoint Server 2007

Published 22 March 07 07:08 PM

I recently set up a lab with a DC and MOSS box and SQL box, not VPC's or VServers, but actual hardware.  The plan is have an environment where I can recreate scenarios, problems etc.  I ran across a problem where I wanted to search a file share on my network AND I didn't want anyone to know where the actual file was coming from.  At first I set up a content sources to the D$ default hidden admin share and the crawler failed with an access denied message.  I then created a share on the the folder but made it hidden from the network browser (d:\docs is shared as Crawl-docs$).  Then I only allowed domain admins and the crawler to see the share and limted connections to the share to 10.  Then I created the content source to point to the share and that worked.

The next problem was how do I hide the actual path to the document?  Under the SSP -> Search Settings, there is a feature called Server Name Mappings that allows you to mask the URL that gets returned in the search results.  I added a server mapping for my file share as http://archive (I also added a DNS entry to point to this site).  Then in IIS I created a virtual directory on my file share that exposes the files over http.  I only allow authenticated users to the file share and did not enable browsing so that the users would have to know the URL to the document to see it.  I found that you have to recrawl after you change the server mapping.

The benefit is that I don't have provide the users with a path to the actual file share and I can ACL the files in one place, while still allowing users to search it.

Now what if the network file share isn't member of the domain?  This one was tough as there is no way to create a rule to that uses a local machine account to use when crawling the file share; only certificates, basic or domain users are allowed.  Luckily it was a windows machine so I create a hidden share that allowed Everyone read access to it.  That worked.

by ivega
Filed under: , ,

Comments

# " + title + " said on March 24, 2007 10:44 AM:

PingBack from http://www.virtual-generations.com/2007/03/24/sharepoint-2007-link-love/

# lalo said on March 12, 2008 10:47 AM:

Hello

I was wondering if sharepoint can crawl a virtual directory of shared files on a separate server in our domain. Accessible via a public ip outside our network?

Thanks

# ivega said on April 21, 2008 1:40 PM:

Response to lalo:

If I unnderstand your question correctly, you want to search an internal share and make it available externally. If that is the case, yes but you have to configure the IIS web site with the correct authentication credentials and ensure that the file share has the correct ACL's for the users accessing the content. Tell me more about the scenario (i.e. forms auth, integrated auth, are you using ISA, etc).

# kathyli said on May 12, 2008 3:21 PM:

I had a Server mapping problem. I had a sharepoint server with SQL 2005 database. File server is on another server. The account I used to crawl the file server has a read access. I was able to crawl the shared content on that file server. The search result display as file:\\[servername]\sharedlocation, I set up the mapping on SSP as file:\\[servername]\sharedlocation to http:\\websitename\location, but when I do the search, the result display as file:\\[servername]\sharedlocation not http:\\, I did not configure virtual directory, I used MOSS 2007.  I thought I alrady make the location webshared, it is able to be searched, just display not right. Do I really need to do it to make the mapping work? If I do, what is the step? Thanks

# ivega said on September 11, 2008 10:48 AM:

Response to katyhyli:

You need the vdir to ensure that when the user clicks the link for http://servername/resource there is something there to display the content. Otherwise it will be a broken link for the users.  After you add the server mapping, you also have to recrawl.

Anonymous comments are disabled
Page view tracker