通过 startup.sh 启动 tomcat 失败,使用 sudo -u myuser 运行 shell 时用户无法工作

通过 startup.sh 启动 tomcat 失败,使用 sudo -u myuser 运行 shell 时用户无法工作
sudo -u myuser sh /var/lib/tomcat6/bin/startup.sh 

失败,但

sh /var/lib/tomcat6/bin/startup.sh 

作为用户 myuser 的工作

我尝试以 root 用户身份运行它来启动服务:

错误:

/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

相关内容