Articles in this section

Error in chrooted environment: nodenv command not found

Plesk for Linux kb: technical ext: nodejs

Symptoms

  • The server is running on CloudLinux with CageFS enabled
  • NodeJS Toolkit extension is installed in Plesk
  • The following error is displayed when accessing chrooted shell of a system user:

# -chrootsh: nodenv: command not found

Cause

The error is a known bug identified as #EXTNODEJS-328, which will be addressed in future updates.

One can monitor the Plesk Change Log for when the bug is resolved.

The /etc/profile.d/nodenv.sh file which is a part of the Node.js toolkit executes the nodenv command, however, there is no nodenv binary in the CageFS template at /usr/share/cagefs-skeleton/.

Resolution

In order to resolve the issue, the following workaround can be applied:

     1. Connect to the server via SSH

     2. Create the file /etc/cagefs/conf.d/nodenv.cfg:

# touch /etc/cagefs/conf.d/nodenv.cfg

     3. Edit the file with your preferred editor and add the following directives within it:

PLESK_INFO: [nodenv]
comment=nodenv by Plesk
paths=/usr/bin/nodenv, /usr/libexec/nodenv, /opt/plesk/node/.

    4. Update CageFS with the following command:

# cagefsctl --force-update

 

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.