I am getting error while i am trying to run JMeter
script in jenkins on CentOS
:
java.nio.file.AccessDeniedException: /home/username/Desktop
I have installed Jenkins
on same CentOS
and I am running it locally.
I have configured all the commands but it says access denied.
java.nio.file.AccessDeniedException: /home/username/Desktop
I am not able to recognize which user is getting accessed while running Jenkins
.
The expected result is to run JMeter
script in Jenkins
successfully.
2
Answers
I went and changed the default user used by Jenkins to the system user. Now i have access and Jmeter scripts have started executing.
It looks like that the user account which is being used for running Jenkins doesn’t have access to
/home/username/Desktop
folder which is being used by your script somehow.You either need to refactor your script and remove all references to the given folder or grant Jenkins read (and maybe write) permissions to it using i.e.
setfacl
command like:another option is to make Jenkins user the owner of the given folder using
chown
command, however it may break your current user access rights so I would not recommend this:one more workaround which I wouldn’t recommend even more is provide everyone read/write/execute permissions via
chmod
commandand last but not the least, you can download Jenkins war and execute it as your current user like:
this way Jenkins will have access to whatever your current user has access to.
You might also be interested in Continuous Integration 101: How to Run JMeter With Jenkins article.