touch: cannot touch '/usr/local/tomcat/logs/catalina.out': Permission denied解决方法

logs目录没有创建修改权限 

./startup.sh 
Using CATALINA_BASE:   /usr/local/tomcat702 
Using CATALINA_HOME:   /usr/local/tomcat702 
Using CATALINA_TMPDIR: /usr/local/tomcat702/temp 
Using JRE_HOME:        /usr/java/jdk1.6.0_24 
Using CLASSPATH:       /usr/local/tomcat702/bin/bootstrap.jar:/usr/local/tomcat702/bin/tomcat-juli.jar 
touch: cannot touch `/usr/local/tomcat702/logs/catalina.out': Permission denied 

 

解决办法: 所有人可操作logs文件。 
chmod说明(u:与文件属主拥有一样的权限[a:所有人];+:增加权限;rwx:可读可写可执行) 
-R:递归所有目录和文件 

sudo chmod a+rwx -R logs  

你可能感兴趣的:(touch: cannot touch '/usr/local/tomcat/logs/catalina.out': Permission denied解决方法)