If you are seeing errors of "touch: cannot touch ‘/opt/apache-tomcat-7.0.81/logs/catalina.out’: Permission denied" similarly, that is because your current account has no permission to access the logs directory under the tomcat path.
Here you need to execute the command of
chmod a+rwx -R $CATALINA_HOME/logs
to get the permission to read/write/execute(+rwx)the all directory(-R); but often you cannot execute this command, because this command need the root access.
Here you can log in root or just use the sudo to execute the command with 5 minutes' root access.
You need to use the VIM to edit the sodo configuration with command below:
visudo
locate at the
##Allow root to run any commands anywhere
root ALL=(ALL) ALL
add "username ALL=(ALL) ALL " after it.
Then you can execute the chmod command and get the all read/write/execute permission for the /logs directory.
And of course then you can execute the start command .
Thank you. contact me with email zhangweicalm@qq.com