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.

Plugin run as root

Discussion in 'cPanel Developers' started by abrender, Jul 23, 2008.

  1. abrender

    abrender Active Member

    Joined:
    Dec 5, 2002
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    We have developed a custom plugin to CPANEL written in PHP. It connects to a MySQL database and loads data to display to the user.

    The problem is, because the cpanel plugin is running as the customers username, the MySQL username and password must be in a file that is readable by anyone on the server :(

    Is there any way to run part of a plugin as root so that it can open a config file owned by root that is chmod 777 - even if it has to be done through some <cpanel tags?

    I've tried creating a custom cpanel module (in /usr/local/cpanel/Cpanel) but those run as the user as well :(

    Thanks!
     
  2. DaveUsedToWorkHere

    DaveUsedToWorkHere Well-Known Member

    Joined:
    Dec 28, 2001
    Messages:
    689
    Likes Received:
    1
    Trophy Points:
    18
Loading...

Share This Page