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.

WHM Compiler Permissions

Discussion in 'General Discussion' started by pixoloo, Feb 16, 2011.

  1. pixoloo

    pixoloo Registered

    Joined:
    Feb 16, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    There are specific accounts I'd like to have permission to compile, so I've added them to the "compiler" group via the WHM interface, but the account still receives access denied when trying to access it. The button to enable compilers for all unprivileged users never appears to changes, staying at "Compilers are disabled for unprivileged users."

    -bash: /usr/bin/gcc: Permission denied

    -rwx------ 2 root root 202368 Mar 31 2010 /usr/bin/gcc*

    WHM 11.28.83
    CENTOS 5.5 i686
     
    #1 pixoloo, Feb 16, 2011
    Last edited: Feb 16, 2011
  2. pixoloo

    pixoloo Registered

    Joined:
    Feb 16, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Any help would be appreciated, hoping to get this resolved today.
     
  3. stevenh512

    stevenh512 Registered

    Joined:
    Mar 30, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    No ideas how to solve this? I have a dedicated server with root access from HostGator and I'm having the same problem trying to give compiler access to one of my user accounts. WHM 11.28.87, CENTOS 5.5 i686 standard. Even as root I can not change the permissions of /usr/bin/gcc from 700 root:root and trying to change the compiler access setting in Security Center does absolutely nothing. I need to give compiler access to this one user account (which I also control) so I can automate deploys of my site.
     
  4. stevenh512

    stevenh512 Registered

    Joined:
    Mar 30, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    In my case, the problem was HostGator's custom configuration on their dedicated boxes. This is pretty HostGator specific and I'm sure it varies a bit depending on how your host configured your server, but maybe it might help someone. I had to edit /scripts/postupcp and comment out the line that says:

    Modules::securegcc();

    Just to be safe I also commented out the whole "sub securegcc" function in /opt/hgmods/Modules.pm

    After that, just run these commands from a root shell and you should be good to go:

    chattr -ai /usr/bin/gcc /usr/bin/i386-redhat-linux-gcc
    chmod 750 /usr/bin/gcc /usr/bin/i386-redhat-linux-gcc
    chown root:compiler /usr/bin/gcc /usr/bin/i386-redhat-linux-gcc
    chattr +ai /usr/bin/gcc /usr/bin/i386-redhat-linux-gcc

    You may (with HostGator at least) have to go through and do this again at some point, it seems they update their postupcp script and /opt/hgmods from time to time.
     
Loading...

Share This Page