Project Environment: the customer deploys the Application Service (Java implementation) on a windows 2008 server, and deploys the JBIZ intermediate Transaction Service Platform (C implementation) on Linux ).
Problem: failed to copy the file in Linux
Let's talk about the problem first, because the project involves interaction with banks. To ensure the security and reliability of capital data, every day, the data in the business system must be compared with the data transmitted by the Bank (this process is fully implemented by the Program). In the previous test environment, the data comparison failed many times. The reason is that the bank data is either incorrect or the format is incorrect. Format problems include not strictly following the agreed data format or redundant line breaks. After the test database is completed, it is reasonable to say that the formal database will be okay. In the first place, I decided to say that the bank's data format was wrong, so that they could strictly follow the agreement. But there is still a problem. Then I will check the cause. I checked the logs carefully and did not find any problems with the bank data, that is, problems with Moving Files (after comparing the data, I need to move the files to other places ). In order to further confirm the problem, I took the data in the company environment for a test, no problem. Then I carefully checked the file permissions of the test environment and formal environment of the client machine. I found that both xxxx and xxxxtest are in the dba group. When I log on with xxxx, I can see the backup folder (where the data is to be moved after the data comparison): drwxr-xr-x 2 xxxxtest dba 4096 X month XX: XX backup. Although both xxxx and xxxxtest are dba users, they only have execution and read permissions. I understand that permission issues are true. Then I deleted the file and re-created it. Display: drwxr-xr-x 2 xxxx dba 4096 X month XX: XX backup. Re-initiate a transaction to compare the data. The data comparison is successful. Note: Linux File Permission symbolic identity: u-owner (owner of the file); g-owner's family; o-others (not the owner or owner's family ); a-everyone or all. Permission: r-read, w-write, and x-execution. Action: + (add permission);-(delete permission); = (unique permission ). Each permission can be represented by a number: r = 4, w = 2, x = 1,-= 0. For example, drwx ------ (700) only the owner can read and write data in the directory. Drwxr-xr-x (755) each person can read the directory, but the content can only be changed by the owner.
Author laoli5290