• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue CHROOT - missing libs (libc6)

3KyNoX

New Pleskian
Hello! I'm currently testing Plesk and plan to get a Web Host Edition when the trial finish.

First Question:

About my hosting activity, I need to enable chroot ssh environment for my future customers that can run a specific executable (trading bot software written with nodejs).

Outside of the chroot, everything running well. But inside the chroot I got this error message:

bash-4.3$ ./gunthy-linx64
./gunthy-linx64: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory​

I looked about this lib file deeply and it seem to be part of libc6 package on Debian Jessie x64.

So, I went to the official Plesk Docs and I found an interesting link:
- How to add new programs to a chrooted shell environment template?

Unfortunately, no wey to add directly a debian package like libc6 using apt, we just have access to the tool "update_chroot.sh" but so...

What I did so far is to locate the missing lib file -> librt.so.1 that I found in the location:
- /lib/x86_64-linux-gnu/librt.so.1

And I copied it in two locations:
- base chroot template -> /var/www/vhosts/chroot/lib/x86_64-linux-gnu/
- and my first customer simulation path -> /var/www/vhosts/my_customer/lib/x86_64-linux-gnu/

Resulting of a new error as follow:

bash-4.3$ ./gunthy-linx64
Pkg: Error obtaining exepath.​

... which is a lot less clear, but what I know about "Pkg" is it's an application that's wrap a nodejs project inside a single executable file with nodejs embedded into it:

- GitHub - zeit/pkg: Package your Node.js project into an executable

From this point, I suppose whole libc6 package library is not fully / completely imported inside the chroot environment.

- So how to import it correctly ?
- Maybe I'll get new errors once libc6 is correctly imported based on the fact it's possible other application(s)/lib(s) are missing.

####################################################

Second Question:

I'm reading alot about Plesk plugins creation on the official docs currently, but just to be sure, I would like to:
- do run / stop / etc actions directly from Plesk interface plugin I've made
- embed the gui-interface linked to this same process inside Plesk too
- when someone order a package from my merchant website, place and configure everything about my application process in a chroot template folder location for my customer once payment process is done. I can write script for this, inside a Plesk plugin. I'm using linux /php / js / python everydays.

Do you think it's possible so far ?

Thanks anyway!
 
There is a lot of trial and error involved in copying apps over to the chroot. Can you get a list of required libraries from the software creator? and then copy to the correct location and then run chroot_update.sh --apply all
 
I am not sure if I understood the question correctly, but to me it seems as if you wanted to run a Node.js application in a chrooted environment? This is not possible, because Node.js requires access to system services.
 
Back
Top