Access Denied when running .exe file with Jenkins

Viewed 584

I have a windows server that is running Jenkins.

As part of my Jenkins pipeline, I am running an executable.

The link in the Jenkins file is:

bat 'DAIRunner.exe -vv param1 http://url.com param2'

When I run this, I get:

Access Denied
EROR: Script returned exit code 1
Finished: FAILURE

Can anyone think why this might be? Is there a chmod equivalent I can do in Windows maybe?

Any help will be appreciated.

1 Answers

With Powershell, on the Jenkins Windows agent where the pipeline is executed, you can check the ACL associated with the file, or its parent folders.
Or simply check its Security properties, from a file explorer.

Then compare that with the account used by the Jenkins agent (you can add a bat 'echo %USERNAME%').

That way, you can check if the Jenkins agent user has the right to access said file.

 https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/get-acl?view=powershell-7.2
Related