[Solved] Jenkins+Ant Error: Error reading project file xxxxx

My colleague used Jenkins + ant + JMeter to build the interface automation shelf. Today, my colleague asked me to help look at a problem

The error reports are as follows:
error reading project file/var/lib/Jenkins/workspace/2021. M6/build. XML

at first, I thought the file could not be found. Later, I went to the server to check it. The file is in. (after thinking about it carefully, it should be not find if the file cannot be found. This error means that there is an error reading the file. In fact, there is an error reading and writing due to insufficient permissions)
later, I can successfully execute the ant command on the server
after step-by-step analysis and troubleshooting, it is found that it is a problem of permissions. After Jenkins is installed on the server, a user named Jenkins is automatically created. By default, the permissions of this user are also used
when I switch the Linux user to Jenkins and execute the ant command, the above error is reported. The root user will not report an error
therefore, the solution is to increase the permissions of Jenkins to root
1. Add the Jenkins user to the root group

gpasswd -a root jenkins

2[UNK]vim /etc/sysconfig/jenkins

JENKINS_USER="root"
JENKINS_GROUP="root"

3. Restart Jenkins

service jenkins restart

Final effect:

Read More: