The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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
    Staff Member

    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 .


Share This Page