how I can change permission for a folder in jenkins?

后端 未结 3 1100
盖世英雄少女心
盖世英雄少女心 2021-01-24 23:34

I have jenkins working in local server on my mac and for a job, I need to run a script shell witch it need to read a json file. I tryied to put it in workflow-lib file. But when

相关标签:
3条回答
  • I would highly suggest you run the Jenkins process as the jenkins user/group and not muck around in there as your own user account.

    This will ensure your file permissions are proper and that the jenkins process only has access to the areas it needs as well as letting you spin up new slaves without worrying about permissions and custom settings.

    You can always use sudo to become the 'jenkins' user to work with the files.

    0 讨论(0)
  • 2021-01-24 23:59

    Please follow this command to give the permissions.

    sudo chown -R <jenkins user>:<jenkins group> /jenkins_root_path
    

    here <jenkins user> and jenkins group is the user and group which you are running jenkins under.

    0 讨论(0)
  • 2021-01-25 00:11

    If the jenkins user is a member in the sudoers list:

    sudo rm -rf /Users/****/.jenkins/workflow-libs/testCollections
    

    But this can be dangerous.

    0 讨论(0)
提交回复
热议问题