Issues with the Windows Next War package deployed to Linux under Tomcat

Source: Internet
Author: User

Recently, a war package developed under Windows was deployed to the Tomcat times under Linux with an error: Tomcat error in opening zip file. Supposedly, if normal, when the war package is copied to the WebApps directory, it will be automatically extracted to a folder with the same name as the package name, but the fact is not decompressed. So to the logs folder to see, reported the above error.

Baidu, maybe the Java version and the version of the Tomcat and Linux inconsistent, a look, really inconsistent, but actually the version is very close, and, ask the developers before, their war package can be automatically decompressed, that is, not the version of the problem. There is the upload of files via FTP does not use the binary transfer method, this is not the reason, because I am using binary mode. So what is the reason? Then I took a closer look at the error message and found that there was a unreadable! Why is there no way to read it? My subconscious mind is probably the file's permission problem.

Decisively ls-lt, look at all the file permissions,

First column: The type and permissions of the Drwxr-xr-x representative file

Start with D as a folder, start with a file,

The connection file begins with L

Subdivision, D behind is actually 3 combinations, each combination has rwx composition, respectively, the permissions of the file owner, group permissions and other user permissions

2nd Column: The number of links to the file.

Columns 3rd, 4: Represent the users and groups who own the files, respectively

5th column: The size of the file.

6th column: The last modification time of the file.

7th column: File name

The original Icardsys.war was the-rw-r-----, which was unreadable by other users except the root user and the system group. So, I think I should give other users a read permission, this can also solve the problem of unreadable. File permission modification, need to use CHMOD,R representative 4,W Representative 2,X Representative 1, such as rwx with 7来, so we chmod 644 Icardsys.war a try. At this point, the discovery can automatically unzip the war package, but also more new generated folders.

To solve this problem, but it is not difficult to find that the cause of the same error may be a variety of, online can not solve your problem, or to think about yourself.

Reference documents:

Http://www.cnblogs.com/wangyuyu/p/3900098.html

Http://jingyan.baidu.com/article/8cdccae963e442315413cd01.html

Issues with the Windows Next War package deployed to Linux under Tomcat

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.