Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

chroot

Discussion in 'General Discussion' started by soulmaster, Jul 26, 2007.

  1. soulmaster

    soulmaster Active Member

    Joined:
    Mar 27, 2007
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    151
    Hello
    I want chroot apache on my cpanel server, I also have suexec enabled. The problem is that after adding user from cpanel, htppd dies because /etc/passwd file in chroot is not updated.
    I need to add some code to cpanel adduser script. The code is like that:
    system '/path/copy.pl'; -it's simply copy-es passwd and group files

    so my question is:
    Where can I find a script that cpanel uses for adding users. Please point me the optimal place in script to add my code in.
    I need my code to be executed after adding a user, but before restarting apache.

    Best Regard D.S
     
  2. soulmaster

    soulmaster Active Member

    Joined:
    Mar 27, 2007
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    151
    please answer me , really need help
     
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,216
    Likes Received:
    10
    Trophy Points:
    313
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    You cannot edit the source code itself, but you can add a hook for the functionality you wish to achieve while a new user is created by editing the wwwuser hooks (Documentation: http://www.cpanel.net/support/docs/hooks.htm#postwwwuser ).
     
  4. soulmaster

    soulmaster Active Member

    Joined:
    Mar 27, 2007
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    151
    many thanks
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice