How i get the ps command in ispconfig ssh user -> Jailkit

Discussion in 'Installation/Configuration' started by jackermann, Jul 23, 2024.

Tags:
  1. jackermann

    jackermann New Member

    Hallo
    I need the ps command to run the deployment via a ssh user of the website.
    I tried to implement it under ispconfig server configuration jailkit with usr/bin/ps without success.
    When I execute the command e.g. always comes:
    ps axo comm,user
    Error, do this: mount -t proc proc /proc
    Can someone help me how to integrate this correctly.
    Thank you very much
    LG - Jules
     
    Last edited: Jul 23, 2024
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    How did you try, more details please.
    You need to read jailkit documentation on how to add commands and directories to a jail. https://olivier.sessink.nl/jailkit/
    What deployment needs ps command and access to /proc? I'm not sure it is possible to include /proc in a jail or if it even is wise.
     
  3. pyte

    pyte Well-Known Member HowtoForge Supporter

    By design the ps command needs to read the /proc directory as it contains all the process information on the system. If the jailed user cannot access /proc, the command will not work. I don't know if thats even possible in a jailkit enovirenment, but i don't have any knowledge on the topic
     
    till likes this.
  4. jackermann

    jackermann New Member

    Thank you very much, I was able to run the deployer without ps, which solved the problem.
     
  5. Waqas Saeed

    Waqas Saeed Member

    if am enabling the jailkit on ssh. php -v doesn't work however. if am keeping it disable the php -v works fine. why does that happens? i have enabled and disabled the php-fpm once.

    overall the site works fine. with ftp/sftp/email/database
    I'm sure there is some bug in the chroot or unused chroot option.
     
    Last edited: Aug 17, 2024
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    You are sure it is a bug? Then you should have checked if there is already a bug report about that, and if not filed a bug report with details on how to reproduce the bug.
    If command php does not work for a jailed user, you must add that application to the jail. I remember old discussions about that on this forum, and ISPConfig manual, which you surely have read, should have some info on this.
    Have you already read Jailkit documentation from Jailkit author? It is quite valuable and well written.
     
    ahrasis likes this.
  7. Waqas Saeed

    Waqas Saeed Member

    Yes! But am not a fighter jet pilot. :)

    It was affecting entire ssh.(everyone's) Am preparing a playground to replicate the issue.

    A bit. If you explain me how does 'Delete Unused JailKit .. ' work in ispconfig3
    it works fine if JailKit is turned off in SSH user.
     
    Last edited: Aug 18, 2024
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Then, you should not claim that there is a bug if you do not even understand how things work and should work.

    Like @Taleman mentioned, PHP was not in jail. When you switch off the jail, your user can see the global system PHP again.
     
    ahrasis likes this.
  9. Waqas Saeed

    Waqas Saeed Member

    but this also impacted other SSH accounts that were untouched. As a result, those accounts encountered the 'php -v: command not found' error.[/QUOTE]
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    All ssh accounts of a website use the same jail.
     
  11. g58211702

    g58211702 New Member

    You may need to check that /usr/bin/ps is correctly included in the jailkit configuration. Ensure that the binary and its required libraries are properly copied to the jail environment.
     

Share This Page