enable and disable compiler access

JamieD

Well-Known Member
Sep 3, 2003
58
0
156
Hi,

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
 

cPanelDavidN

Well-Known Member
Staff member
Dec 17, 2009
571
3
68
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 .

Regards,
-DavidN