Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Permission denied at System.Diagnostics.Process.ForkAndExecProcess - Bitbucket pipeline

Luis Castro July 25, 2022


Hi all,

I am getting this error whilst trying to start WinAppDriver.exe when running bitbuckets pipeline. Does anyone know how I ensure it runs as admin when running via bitbuckets pipeline?

System.ComponentModel.Win32Exception : Permission denied
at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec) at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at System.Diagnostics.Process.Start(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start(String fileName)

Thank you,

1 answer

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 28, 2022

Hello @Luis Castro ,

Welcome to Atlassian Community.

The application you are trying to execute seems to be a Windows executable. In this case, could you please confirm if you are using bitbucket windows runners ?

If yes, you could open the PowerShell windows as an Administrator and then execute the /start.ps1 script to start the runner from that admin PowerShell session.

Also, make sure you have met all the pre-requisites to use windows runners outlined in the below documentation : 

If that does not work, please share your bitbucket-pipelines.yml file with us so we can take a deeper look.

Thank you, @Luis Castro .

Kind regards,

Patrik S

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events