简体   繁体   中英

log parser for a log file on remote windows machine

I have a log parser2.2 query for parsing log on remote windows machine. When the query is run, on log parser command prompt; i get successful output. Following is the query :

logparser -i:Textline -rtp:-1  -stats:OFF \"SELECT EXTRACT_SUFFIX(text,0,\'(IBM PC)\') AS REPORT_SINCE from \\\\remote_machine\\remote_folder\\XXXXX.log where text like \'%IBM PC%\'\"";

The same command if , used in a java program (jsp); it throws the following error:

Task Aborted. 

Following is error trace :

Cannot open : Error opening files: Error searching for files in Error = folder \\remote_machine\remote_folder: Access is denied.

Any idea as to why this is happening & how to get it fixed ?

Access denied means that the application is being run from an account that is not permitted to access that remote folder. If the command is failing within the context of a JSP, that means that the account / identity that is running the web container doesn't have the necessary permissions.

This could be a deliberate security decision. Letting your web server access remote shares is asking for trouble ... if your website gets "hacked". It is prudent to run a web container with minimal privileges as a precaution.

This is not a programming problem per se . Rather it is a problem of figuring out why you don't have permission, and how to get permission safely; ie without making your entire network more vulnerable to hackers. Talk to your local (Windows) system administrators.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM