Microsoft KB Archive/182626

From BetaArchive Wiki
Knowledge Base


Article ID: 182626

Article Last Modified on 6/23/2005



APPLIES TO

  • Microsoft Internet Information Server 4.0



This article was previously published under Q182626

We strongly recommend that all users upgrade to Microsoft Internet Information Services (IIS) version 6.0 running on Microsoft Windows Server 2003. IIS 6.0 significantly increases Web infrastructure security. For more information about IIS security-related topics, visit the following Microsoft Web site:

SYMPTOMS

When you delete a file and then immediately copy a file with the same name to the FTP server, an "Access is Denied" error message may occur. The following command sequence will result in the "Access is Denied" error:

   PUT myfile.txt
   [file is transferred to FTP server]
   GET myfile.txt
   [file is transferred from FTP server to FTP client]
   DEL myfile.txt
   [file is deleted from FTP server]
   PUT myfile.txt
   [file is supposed to be transferred to FTP server,
   however, you will get an "Access is denied" message]
                    

CAUSE

The FTP server caches the file handles of the deleted files that were previously fetched preventing their deletion. After a minimum cache sweep period, the file finally gets deleted when the cached file handle is closed. If the same file is put on the server before this minimum sweep interval has elapsed, the Put command fails with the "Access is Denied" error message.

RESOLUTION

To work around the problem, do one of the following:

After deleting the file, wait for a short time (about 30 seconds), and then copy (put) the new file to the FTP server.

-or-

Rename the file that is to be deleted, copy the new file to the FTP server, and then delete the renamed file.

STATUS

Microsoft has confirmed that this is a problem in Microsoft Internet Information Server 4.0.

MORE INFORMATION

The following registry information may also be helpful in regards to this issue.

Please be aware that by adding the following registry information, you may negatively impact the performance of the FTP server.

If you want to completely disable file caching on your server, set the following parameter:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\InetInfo\Parameters\DisableMemoryCache DWORD 1


If you want to set a time value for caching, set:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\InetInfo\Parameters\ObjectCacheTTL DWORD <value_in_seconds>


Try checking for these parameters (particularly a time value for ObjectCacheTTL) and test by adding the DisableMemoryCache key under Inetinfo to see if that resolves the issue.

Keywords: kbbug kbfaq KB182626