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!

enable and disable compiler access

Discussion in 'cPanel Developers' started by JamieD, May 12, 2011.

  1. JamieD

    JamieD Well-Known Member

    Sep 3, 2003
    Likes Received:
    Trophy Points:

    I want to be able to enable compiler access for a user when a specific program is called. So want I want to happen is something like this:

    - user logs on through SSH
    - runs command 'bundle install'
    - before the bundle command is run compiler access is enabled for the user
    - after the bundle command has finished running compiler access is disabled for the user

    This process needs to be transparent to the user if possible.

    I have toyed with the idea of writing a wrapper script that replaced bundle, this script is responsible for enabling and disabling compiler access. I've had trouble getting this to work as obviously the user running the program doesn't have permission to give themselves compiler access.

    Any bright ideas? Thanks
  2. cPanelDavidN

    cPanelDavidN Integration Developer

    Dec 17, 2009
    Likes Received:
    Trophy Points:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Hi JamieD,

    You're correct that it's going to be a permission issue. You'd have to have a script that can securely escalate and de-escalate privileges. The best way that I can think of doing this on cPanel is to delegate the scripts action to a special API/admin wrapper. You can find some details here, Privilege Escalation with cPanel API Calls .

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

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