Fixing the macOs command issue
1. Permission denied when running a script file
dheeraj.kumar@LT-0623-011 bin % ./startup.sh
zsh: permission denied: ./startup.sh
execute your command by prefixing it with chmod +x
dheeraj.kumar@LT-0623-011 bin % chmod +x ./startup.sh
dheeraj.kumar@LT-0623-011 bin % ./startup.sh
Using CATALINA_BASE: /Users/dheeraj.kumar/Downloads/apache-tomcat-8.5.92
Using CATALINA_HOME: /Users/dheeraj.kumar/Downloads/apache-tomcat-8.5.92
Using CATALINA_TMPDIR: /Users/dheeraj.kumar/Downloads/apache-tomcat-8.5.92/temp
Using JRE_HOME: /Library/Java/JavaVirtualMachines/jdk-1.8.jdk/Contents/Home
Using CLASSPATH: /Users/dheeraj.kumar/Downloads/apache-tomcat-8.5.92/bin/bootstrap.jar:/Users/dheeraj.kumar/Downloads/apache-tomcat-8.5.92/bin/tomcat-juli.jar
Using CATALINA_OPTS:
Tomcat started.
2. Command Not Found
dheeraj.kumar@LT-0623-011 bin % sudo ./startup.sh
Password:
sudo: ./startup.sh: command not found
execute your command by prefixing it with E-
dheeraj.kumar@LT-0623-011 bin % sudo -E ./startup.sh
3. If you are trying to create the myid file with execute permissions, you can use the touch command followed by chmod:
sudo touch tmp/zookeeper-2/myid sudo chmod +x tmp/zookeeper-2/myid
Reference : https://www.baeldung.com/linux/sudo-command-not-found
Comments
Post a Comment