How to: Configure Enterprise Search to index a file share

Posted Wednesday, July 1, 2009 9:53 AM by CoreyRoth

I am sticking with my series of introductory Enterprise Search topics today by writing up some details on how to index a file share.  Setting up a file share index is pretty simple, but there are a few things to know, so that is the point of today’s post. 

The first step of indexing a file share is identifying your crawl account.  This is the account that will be used to index the file share (unless specified differently with a crawl rule) and therefore will need read access to the file share.  Start by granting read access on this account to any folder, subfolder, and file that you want indexed.  Any folder this account doesn’t have access to will be excluded.  If you are not too familiar with how permissions work on file shares, there are two places that an account must have permission: the Sharing tab and the Security tab.  You use the Security tab to grant access to an account on the file system itself.  This would be the same if that user is logged into that machine directly and trying to view the files.  The Sharing tab is what permissions the user has when accessing that folder over the network.  In order for an account to be able to read files over the network, the user must have read permission on both tabs.  Here is an example of what mine looks like for my crawl account MOSS_Setup.  Note: that screenshot is from Windows Server 2008.  Pervious versions looked a bit different.

EnterpriseSearchSharingTab

Security Tab with read access:

EnterpriseSearchSecurityTab

After you have configured permissions on your account, you need to go to the SSP –> Search Administration –> Content Sources.  Create a new content source and give it a name.  I called mine File Share in this case. Then you need to specify a start address.  You can specify the path as file://server/share or \\server\share.  Enter the path to one or more file share sand then save the content source.  You can also specify whether or not to index subfolders or not here. This is what my file share looks like. 

EnterpriseSearchFileShareContentSource

One thing to note before crawling is that, it will only index file types that you have allowed on the File Types page.  For example PDF is not included by default.  Add any extensions that you might need.  If you need to add any file types, specify the extension without the period (i.e.: pdf not .pdf).  You can also add file types programmatically.  This alone is enough to get it indexed, but if you want the contents of each file indexed, you will also need to install an appropriate IFilter for any new file type.

Once your file types are in order, you are ready to begin a full crawl.  After the crawl is completed, view the Crawl Log and verify that your files were indexed.  If there was a permissions problem or any other issues accessing the file share, you will see it here.  At this point you can go to your search center and try a search.  If all goes well, you should see some search results.  To see what got indexed, you can easily write a keyword query to show everything in the content source.  For example:

ContentSource:”File Share”

The results would look something like this.

EnterpriseSearchFileShareResults

As you can see it’s pretty simple to index file shares.  For more information on querying by content source, check out this post.

Follow me on twitter.

Comments

# re: How to: Configure Enterprise Search to index a file share

Friday, October 15, 2010 3:03 PM by Javier

My question is: if file share have ntfs permissions for diferent sharepoint users, search result will be considerd?

Thanks in advance

# re: How to: Configure Enterprise Search to index a file share

Monday, October 18, 2010 10:32 AM by CoreyRoth

When SharePoint indexes a file share, it will pick up the permissions and automatically security trim results for users who do not have access to the files.  For this to work, your crawl account must be an account with read permissions only (not an administrator).

# re: How to: Configure Enterprise Search to index a file share

Wednesday, November 10, 2010 5:53 PM by Kimberly

I have a question - we are crawling several file shares but the users in SharePoint 2010 are unable to edit the documents when they do a search in SP.   They are only able to open the docs in Read Only mode (they aren't asked, it's automatically happening).  Is there something I can do to change this?  They want to be able to edit the docs when they pull them from the file share via SP.

Thanks!!!!!!!!!!!

# re: How to: Configure Enterprise Search to index a file share

Friday, November 19, 2010 8:11 AM by Akshay

is it possible to Configure MS Search when we are working in a Workgroup Env...

# re: How to: Configure Enterprise Search to index a file share

Monday, November 22, 2010 4:53 PM by CoreyRoth

@Akshay It may be possible, but I'm not 100% sure.  You would definitely need to create a crawl rule and specify an account to use to access that file share.

# re: How to: Configure Enterprise Search to index a file share

Wednesday, June 1, 2011 9:24 AM by vikas

Hi Corey,

Can we setup a crawl rule to perform indexing on historic versions of documents in SharePoint. SharePoint runs crawl on only last approved version of a document and accordingly it display only latest versions in search result and skip all historic version having matching search criteria. One of my client have requirement that each piece of matching content should appear in search result no matter it is latest or historic.

From there business need there point is very reasonable. I explored possibility of custom solution to implement this but not found any help available. Although I have found a product which enables version search in SharePoint 2010 and FAST. Demo at their site stoictech.sharepoint.com/.../VersionSearch.aspx looks promising. Do you know about any other better solution or product which can enable version search.

Thanks for your help.

Vikas

# re: How to: Configure Enterprise Search to index a file share

Wednesday, June 1, 2011 9:29 AM by CoreyRoth

@Vikas Indexing previous and unapproved versions is not included by design.  You are definitely looking at a custom solution.  I have not looked at the product you mentioned yet, but I have heard of it.

# re: How to: Configure Enterprise Search to index a file share

Monday, November 14, 2011 10:47 PM by Kranthi

Hi Corey,

Can we meta tag documents from the file share?

Thanks

Kranthi

# re: How to: Configure Enterprise Search to index a file share

Tuesday, November 15, 2011 5:45 AM by Shashwath

Can we include xml documents this way and index it  ?

# re: How to: Configure Enterprise Search to index a file share

Friday, November 18, 2011 8:17 AM by Marcin

hi Corey,

I have got a question re: Sharepoint 2010 search and file share indexing.

We are trying to crawl and index SVN checkouts located on a network share (WIndows with NTFS) and at the same time leverage SVN path-based access rules. We want to index files and their content but then results should be returned based on permission. Any thought or ideas ? Rgds,Marcin

# re: How to: Configure Enterprise Search to index a file share

Wednesday, December 7, 2011 8:37 PM by CoreyRoth

@Kranthi I'm afraid you can't unless you move the documents into SharePoint or look at a third party solution (i.e.: AvePoint).

# re: How to: Configure Enterprise Search to index a file share

Wednesday, December 7, 2011 8:38 PM by CoreyRoth

@Shashwath yes you can index XML files on a file share as well.

# re: How to: Configure Enterprise Search to index a file share

Wednesday, December 7, 2011 8:43 PM by CoreyRoth

@Marcin That can be done but will take quite a bit of effort.  To implement security trimming you basically need to create a search indexing connector.   They are pretty difficult to write but if you are really interested this link should help.

msdn.microsoft.com/.../ee556429.aspx

# re: How to: Configure Enterprise Search to index a file share

Wednesday, February 22, 2012 3:38 PM by Kishore

Hi,

This article is awesome, it helped me a lot. Thank you.

I am new to search and sharepoint 2010.

I have question, I am using FAST search for SP 2010, I created file share content source and I can search for files  in the network, every thing works great, but I can only search files in file share only through file name, but I want to search files depending on the data which is present in that file, How can I achieve this?

If I upload the same file in sharepoint and do indexing through "sharepoint sites" content source then that file is able to search depending on the data present in the file, but it is not working with file share.

Thank you very much for ur help, I appreciate it.

-Kishore

# re: How to: Configure Enterprise Search to index a file share

Thursday, February 23, 2012 7:55 AM by CoreyRoth

@Kishore FAST Search for SharePoint should index the contents of the files in the file share without any extra configuration.

# Search fileshare | Miamidadekidsd

Friday, May 25, 2012 9:45 AM by Search fileshare | Miamidadekidsd

Pingback from  Search fileshare | Miamidadekidsd

# re: How to: Configure Enterprise Search to index a file share

Saturday, February 2, 2013 8:28 AM by OvidiuG

Hi Corey,

I use FAST Search for SharePoint 2010 and I crawl some shared directories.

I have a problem with crawling blocked files - files which are coming from Internet, and they are blocked (because of data streams).

Is there a possiblity to crawl these files without modifying them?

Is there a possiblity to not crawl these kind of files? To tell to FAST not to crawl these kind of files?

The main issues is the fact that crawling become very very slow when it hit these files (as an example, there are about 5 documents crawled per second).

Thanks in advance for your help.

Ovidiu

# SharePoint-Suche: Integration von File Shares aufgepeppt - Communardo Techblog

Pingback from  SharePoint-Suche: Integration von File Shares aufgepeppt - Communardo Techblog

# re: How to: Configure Enterprise Search to index a file share

Wednesday, December 2, 2015 7:26 AM by atul

I have crawled one network folder with the read only permission as set by you on sp2013, crawled successfully, but results are available to all users irrespective of permisisons

# re: How to: Configure Enterprise Search to index a file share

Monday, December 7, 2015 8:38 AM by CoreyRoth

This means your crawl account has too many permissions.  It should be just read only.  Double check and use the permissions checker to verify.  If this account functions as an admin account, security trimming will not work.

Leave a Comment

(required)
(required)
(optional)
(required)