Soatestcli Groovy script extension tool shell command call throws Permission Denied.
I've a groovy external tool script setup to call the python command from shell. Code is "python test.py" .execute().
Which is working fine in my local machine. Now I have Jenkins instance running in a server from where I'm running the same test case with soatestcli and it gives me permission denied for Calling python. I can call "ls".execute() without any issues but any process like python or java gives me permission denied. It would be really great if someone could help me here.
Answers
-
This sounds like an environment issue. I'd recommend verifying which user the Jenkins jobs is running as. This would be the user the Jenkins slave process is running as. Perhaps that user doesn't have permission.
1 -
Hi joy34,
Have you tried starting SOAtest with admin privileges and running your test/script?
You can also try using the external tool to invoke your python script.1 -
Can you help me find out the user for jenkins? I'm using the groovy code sample from this post:
https://forums.parasoft.com/discussion/2847/how-to-execute-jar-file-using-jython-or-groovy-script-via-extension-tool#latest0 -
Hi OmarR , the jenkins is hosted on a client linux box, I don't have admin rights there.
0 -
Also one additional note is that if I run python dirrctly from Jenkins shell , that works fine too.
0 -
Hi joy34,
You can find the user that Jenkins is using in the Manage Jenkins ->System Information, it will be listed under "user.name". If you did not modify the user and used "apt-get" to install Jenkins, by default the installation will create a "Jenkins" user to run the jobs under and that is usually the user that is executing the jobs. Another way you can find out the user is you can create a Jenkins job and make it execute a batch script with the command:
whoami
and this will output the current user that is running the job.
2