Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

SymJavaAPI / createFileScanRequest / FILE_ACCESS_FAILED

Created: 14 May 2012 • Updated: 10 Jun 2012 | 6 comments
This issue has been solved. See solution.

Hi,

does anyone face same Problems? When I scan a local file with with Java SDK example Code like:

 

java -cp .;SymJavaAPI.jar; JavaAPICheck -server:10.#.#.#:1344 -file:.\TestFile-128kB.data

(different Windows7 Clients and Solaris too)  I got:

----------------------------------------------------------------------
Scanning file ........................................................
----------------------------------------------------------------------
Results ..............................................................
----------------------------------------------------------------------
File Scanned             : .\TestFile-128kB.data
Scan Policy               : DEFAULT
File Status                 : FILE_ACCESS_FAILED
Total Infection            : 0
Virus Def Date            : Sun May 13 00:00:00 CEST 2012
Virus Def Revision No : 007
Scan Engine IP          : 10. ...
Scan Engine Port     : 1344
Scan Engine Port     : Able to connect

Any idea?

Comments 6 CommentsJump to latest comment

TSE-JDavis's picture

Why have you put a period at the beginning of the file path? I doubt you have a folder with a period as its name since most operating systems will not allow that. Try taking out the period and slash. If you need to specify a full path, put it into quotations marks.

ingo.siegel's picture

Hi TSE-JDavis

Greetings from Germany - sorry for my late reply, we've had some holidays.

I heed your advice and tried:

<full qualified>/java -cp SymJavaAPI.jar: JavaAPICheck -server:10.#.#.#:1344 -file:"<full q ualified>/TestDir/TestFile-128kB.data"

i got the same message:

----------------------------------------------------------------------
Scanning file ........................................................
----------------------------------------------------------------------
Results ..............................................................
----------------------------------------------------------------------
File Scanned             : <full qualified>/TestDir/TestFile-128kB.data
Scan Policy              : DEFAULT
File Status              : FILE_ACCESS_FAILED
Total Infection          : 0
Virus Def Date           : Sun May 20 00:00:00 MEST 2012
Virus Def Revision No    : 009
Scan Engine IP               : 10.#.#.#
Scan Engine Port     : 1344
Scan Engine Port     : Able to connect

 

I face the same behavior on different Plattforms (Win7 and Solaris) the Testfile is definitly not used by another program.

I'm using Symantecs JavaAPICheck Class and SymJavaAPI.jar Package along with my testfile (see attm):

 

AttachmentSize
SymJavaAPI-Test.zip 130.03 KB
TSE-JDavis's picture

Which account is symcscan running as? Does that user have access to this file over the network? Did you provide it with a correct UNC path?

ingo.siegel's picture

same Session - a streambased scan works fine:

<full qualified>/java -cp SymJavaAPI.jar: JavaAPICheck -server:10.#.#.#:1344 -file:TestFile-128kB.data -streambased:1 -policy:scan -output:out.txt -originalname:TestFile-128kB.data
----------------------------------------------------------------------
Scanning file ........................................................
----------------------------------------------------------------------
Results ..............................................................
----------------------------------------------------------------------
File Scanned             : TestFile-128kB.data
Scan Policy              : SCAN
File Status              : CLEAN
Total Infection          : 0
Virus Def Date           : Mon May 21 00:00:00 MEST 2012
Virus Def Revision No    : 005
Scan Engine IP           : 10.#.#.#
Scan Engine Port         : 1344
Scan Engine Port         : Able to connect

filebased scan fails....

TSE-JDavis's picture

Stream Scanning is the function where we stream the file to the Scan Engine over port 1344. Otherwise, the user that symcscan is running as on the server needs to be able to access the path you specified. A UNC path normally looks like this: \\clients-fully-qualified-hostname-or-ip\sharedfolder\filename.

SOLUTION
ingo.siegel's picture

A Filebased scan works fine at the same Host where ScanEngine is running. Yes, Scan Engine needs access to the given File...

 

<full-qualified>/java -cp SymJavaAPI.jar: JavaAPICheck -file:JavaAPICheck.java
----------------------------------------------------------------------
Scanning file ........................................................
----------------------------------------------------------------------
Results ..............................................................
----------------------------------------------------------------------
File Scanned             : JavaAPICheck.java
Scan Policy              : DEFAULT
File Status              : CLEAN
Total Infection          : 0
Virus Def Date           : Sat Jun 09 00:00:00 MEST 2012
Virus Def Revision No    : 016
Scan Engine IP               : 127.0.0.1
Scan Engine Port     : 1344
Scan Engine Port     : Able to connect