Jenkins And NodeJS Plugin - Permission Denied Error=13

后端 未结 2 1272
星月不相逢
星月不相逢 2021-01-18 22:44

I\'m running the latest version of Jenkins (v 1.563) and Node (0.10.28).

I have a Java project that builds fine.

When I add a pre

2条回答
  •  说谎
    说谎 (楼主)
    2021-01-18 22:51

    Fixed it without a sudo; I suppose that running Jenkins under root is very unsafe.

    Here are the working settings:

    /var/lib/jenkins/tools should be owned by jenkins:jenkins:

    drwxr-xr-x   6 jenkins jenkins      4096 May 12 15:12 tools
    

    If you need any nodejs package installed globally (for example, grunt), the easier way is to avoid jenkins window Global npm packages to install (it will need root permissions), but run this in linux console:

    sudo npm install -g grunt
    

    It will install grunt for everyone and Jenkins will be able to use it during building process.

提交回复
热议问题