Protecting one's server from viruses is essential, and a common concern is that unregulated file transfer applications may open potential holes for viruses infections.
FileUp does not contain any inherent virus protection. However, it will work in conjunction with your virus scanning solution of choice. See below for more information about how FileUp interacts with virus scanners. |
The virus scanner should automatically scan the file right after it's written to disk.
Most virus checkers, such as Norton AntiVirus, will verify all writes to the system hard disk. Since FileUp uses regular file system write calls, a virus scanner installed on the web server will detect any uploaded viruses. Since viruses cannot cause any harm until they are executed, automatically scanning after a file is written to disk should be sufficient protection. Note: FileUp only writes the uploaded file to disk on the server one time - when it caches the file with a ".tmp" extension. It then renames the file when you call a Save method. Therefore, you may want to make sure that your virus scanner will scan files with the ".tmp" extension.
If you wish to programatically scan files from your upload application, and return an error message to the user, you will need to find a virus scanner that provides a COM API. You could then call the virus scanner from your upload script AFTER the file is cached but BEFORE it is saved. If the virus scanner indicates a problem, you can then NOT save the file, and return an error message to the user.
Enabling virus protection on the server will interfere with the upload process and you must make a slight adjustment in FileUp to account for this. The anti-virus software will lock the files as soon as they are written to disk. So, FileUp may throw an error that could be something like:
SoftArtisans.SAFile.1 error '80020009'
Cannot create temporary file.
Or
Error 80020009
Error occurred when moving cached file to final destination.
This error occurs because the anti-virus software may lock the file during the scanning process and FileUp is NOT able to access it in order to successfully
- cache the file (as a temp file, something like "sa123.tmp") in a temp location on the server (specified in your "upl.path" statement), or
- rename and move the temp file to its final destination.
Adjusting FileUp, via the Registry, it is possible to set the default number of seconds that FileUp will re-attempt modifying the locked file.
In HKEY_LOCAL_MACHINE
\SOFTWARE
\Software Artisans
\SA-FileUp
\Parameters
LockedFileRetryTime sets the maximum of number of seconds to retry modifying a locked file before failing.
References: Microsoft Knowledge Base articles Q191742 and Q182626.
|