Search code examples
linuxbashjmeterpermissions

Cannot run jmeter script in bash - permission denied even though execute permissions are granted


I am struggling with running jmeter.sh. I am a root user, and I have granted a required execute permission on the script file. However I keep getting error:

./jmeter.sh: line 111: ./jmeter: Permission denied

I am trying to run the script with following command:

./jmeter.sh -n -t mytest.jmx -l log.jtl

Could someone help me understand this?


Solution

  • You've granted execution permissions to jmeter.sh wrapper script and forgot to do this for jmeter script

    So if you give execution permissions to jmeter script using chmod command the error will go away

    chmod +x jmeter
    

    You can also always run JMeter via java -jar ApacheJMeter.jar command (don't forget to set parameters like Xmx and add-opens

    More information: JMeter Non-GUI Mode: Useful Tips