sudo -u myuser sh /var/lib/tomcat6/bin/startup.sh
fails while
sh /var/lib/tomcat6/bin/startup.sh
as user myuser works
I try to run it as root user to start a service:
errors:
/usr/lib/jvm/java-6-openjdk/bin/java: 1: /usr/lib/jvm/java-6-openjdk/bin/java: ▒▒: not found
/usr/lib/jvm/java-6-openjdk/bin/java: 1: /usr/lib/jvm/java-6-openjdk/bin/java: ▒▒: not found
/usr/lib/jvm/java-6-openjdk/bin/java: 1: /usr/lib/jvm/java-6-openjdk/bin/java: ▒▒: not found
/usr/lib/jvm/java-6-openjdk/bin/java: 1: /usr/lib/jvm/java-6-openjdk/bin/java: cannot create 1@@8▒@8: Permission denied
/usr/lib/jvm/java-6-openjdk/bin/java: 1: /usr/lib/jvm/java-6-openjdk/bin/java:ELF: not found
/usr/lib/jvm/java-6-openjdk/bin/java: 2: /usr/lib/jvm/java-6-openjdk/bin/java: Syntax error: ")" unexpected