Jenkins is used by default to create a user with the Jenkins under Linux
Linux is more restrictive, with Jenkins users, there will be a lot of restriction. The workaround here is to modify the user used by the Jenkins runtime.
Users who are modified to root or other slightly larger permissions do not have to be changed to root. This is just a demo.
Jenkins_home= "/var/lib/jenkins"
# # Type:string
# # Default: ""
# # Servicerestart:jenkins
#
# Java executable to run Jenkins
# When left empty, we'll try to find the suitable Java.
#
Jenkins_java_cmd= ""
# # Type:string
# # Default: "Jenkins"
# # Servicerestart:jenkins
#
# Unix user account that runs the Jenkins daemon
# Be careful if you change this, as you need to update
# Permissions of $JENKINS _home and/var/log/jenkins.
#
Jenkins_user= "Root"
After the modification is complete, save and restart the service!
This makes it much smoother to execute the relevant commands.