IntelliJ needs to copy tomcat/conf directory to pr

2019-01-18 01:58发布

I have a freshly installed Tomcat 7 server, and I'm trying to make IntelliJ deploy a HelloWorld Spring MVC app to Tomcat.

My Tomcat home is /usr/share/tomcat7 and Tomcat base is /var/lib/tomcat7

However, when I try to run the project, IntelliJ throws an error saying:

Error running Tomcat : Error copying configuration files from /var/lib/tomcat7/conf to /home/adonis/.IntelliJIdea12/system/tomcat/Tomcat__SpringMVCApp/conf : /var/lib/tomcat7/conf/tomcat-users.xml (Permission denied)

Here is a screenshot - http://i.imgur.com/CQ3z0e1.png

Any permissions I need to set up?

5条回答
Summer. ? 凉城
2楼-- · 2019-01-18 02:32

I added my own user account to the tomcat7 group.

And chmod g+r /var/lib/tomcat7/conf/tomcat-users.xml

查看更多
Explosion°爆炸
3楼-- · 2019-01-18 02:35

For me, this worked for Tomcat 8 on Manjaro Linux:

sudo chmod -R 755 /usr/share/tomcat8/
查看更多
混吃等死
4楼-- · 2019-01-18 02:49

I had the same problem and these steps helped me to Start my tomcat7 from Intellij :

I have Linux Mint 17,and Tomcat 7 which is installed using apt-get

CATALINA_HOME in /usr/share/tomcat7 and CATALINA_BASE in /var/lib/tomcat7

1- First I created a soft link which references /etc/tomcat7

cd /usr/share/tomcat7
ln -s /etc/tomcat7 conf

2- Then you have to change the access permissions of /etc/tomcat7

sudo chmod -R 655 /etc/tomcat7/

That's it.

查看更多
别忘想泡老子
5楼-- · 2019-01-18 02:51

Try chmod -R 777 /var/lib/tomcat7/conf/, it works to me.

查看更多
唯我独甜
6楼-- · 2019-01-18 02:54

Make sure that files under /var/lib/tomcat7/conf/ directory have read permission for the user IntelliJ IDEA is running from.

chmod -R 644 /var/lib/tomcat7/conf/

should help.

Also check that /home/adonis/.IntelliJIdea12/system/tomcat/ has correct permissions and owner. Could be that it was created from a different user and your current user doesn't have the rights to write into it.


If it doesn't help, download and unpack a new Tomcat installation from .tar.gz file, configure IDEA to use this installation instead.

Note that Tomcat installed using the package manager on some Linux systems has non-standard layout and permissions, and therefore will not work with IDEA.

查看更多
登录 后发表回答