Home     Products      Support      Corporate     Sign In 
Support Knowledge Base, Article 984
4.x, 5.x
SoftArtisans.SAFile.1 error '80070005' - Error occurred when moving cached file to final destination.

When uploading a file with FileUp, the following error may occur:

SoftArtisans.SAFile.1 error '80070005'
Error occurred when moving cached file to final destination. Error: 5 Please check the NTFS permissions for the directory "C:\[directoryName]" and the directory containing the file "C:\[directoryName]\[filename]". These directories require Read, Write and Delete permissions by the anonymous user ( NT account: IUSR_computername ) and/or by your authenticated users. Access is denied.


The error above means that either FileUp's cache directory and/or destination directory does not have the necessary permissions for FileUp to save the files that have been uploaded. The user account that FileUp is running as needs to have Read, Write, and Modify permissions to both the cache and destination directories.

First, check that your file paths are all spelled correctly in your code. Then, follow the instructions that follow to determine which account needs permission and which directories it is trying to access.

Determining the correct account

The default accounts that FileUp runs as are discussed below. The error message itself is a little misleading because FileUp does not always run as the IUSR_computername account. The following chart shows the default accounts that FileUp runs as for different versions of IIS and different web technologies:

  IIS5 (Windows 98, 2000, XP) IIS6 (Windows Server 2003)
ASP IUSR_computername IUSR_computername

There are a variety of other options that are possible, depending on your system and application configuration, including the following:

  • In ASP: If your application is set in IIS to use Basic, Digest or Integrated Windows authentication, FileUp will run as the authenticated user.
  • In ASP.NET: If impersonation is turned on in the machine.config or web.config file, FileUp will run as the user specified in the .config file. If impersonation is set to true but a user is not specified in the .config file, FileUp will use IIS's settings (Anonymous, Basic, Digest, or Integrated, as configured). For more information see this MSDN article about impersonation in ASP.NET.
Determining the cache directory

The cache directory is typically set using FileUp's Path property, unless the HTTPModule or ISAPI filter is being used. If the Path property is not set it will default to the system temp directory. (This directory is determined by the TEMP environment variable, which is set in Control Panel, System, Advanced, Environment Variables.)

If you are using the HTTPModule or ISAPI filter, FileUp will choose a cache location based on a registry entry. This entry is initially set to the same path as the system's PATH environment variable. To find this registry setting, do the following:

  1. Open the Start menu and select Run.
  2. Enter regedit and click OK.
  3. Expand HKEY_LOCAL_MACHINE\SOFTWARE\Software Artisans\SA-FileUp\Parameters.
  4. The cache directory is set by the FileUpTempDir key (ISAPITempDir in FileUp v4). You can change this value if desired.
Determining the destination directory

The destination directory is set in one of two ways with FileUp:

  • When calling Save(), the cache directory is used.
  • When calling SaveAs(), the directory passed to SaveAs() is used.
Setting the permissions

As mentioned previously, the necessary account must have Read, Write, and Modify priveleges to the cache and destination directories. To set the necessary permissions for FileUp on a directory in Windows 2000, XP, or 2003 Server, do the following:

  1. In Windows Explorer, right click the directory you wish to set permissions on, and choose Properties.
  2. Click on the Security tab.
  3. In the Name panel, select the desired user from the list, or use the "Add..." button to add that user if it is not listed.
  4. In the Permissions panel, select the Modify checkbox under the Allow column. This will set all the necessary permissions for that user and FileUp.
  5. Click OK.

Special consideration for Windows 2003

In Windows 2003, if your cache or destination directory is within C:\inetpub\wwwroot\ or any of its subfolders you will need to perform one additional step. By default, there are deny priveleges for deletion that you must remove:

  1. On the Security tab of the folder properties, click the Advanced button.
  2. You should see an entry in the list that says "Deny Internet Guest Account Special...". Choose this entry and click the Edit button.
  3. Scroll down and uncheck the "Deny" column for "Delete Subfolders and Files".
  4. Click OK.
Created : 4/5/2005 5:27:25 PM (last modified : 4/5/2005 5:27:24 PM)
Rate this article!