Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Sparse bit is not always being set when restoring encrypted files using EFS raw APIs


Symptoms

You use WriteEncryptedFileRaw to restore encrypted files on Windows Vista or Windows Server 2008. After the restore of an encrypted sparse file the FILE_ATTRIBUTE_SPARSE_FILE is missing.

↑ Back to the top


Cause

This is a bug in WriteEncryptedFileRaw API.

↑ Back to the top


Workaround

After restoring an encrypted file, use fsutil.exe to set the parse bit back on it.

fsutil.exe sparse setflag <full path name to file>

↑ Back to the top


More Information

Details regarding fsutil can be found at : http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/fsutil.mspx?mfr=true
Location of fsutil is: %windir%\system32

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


Keywords: kb

↑ Back to the top

Article Info
Article ID : 2574726
Revision : 1
Created on : 1/7/2017
Published on : 7/5/2011
Exists online : False
Views : 92