Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Dec 2002
    Posts
    39

    Default Plugin run as root

    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. #2
    Member
    Join Date
    Dec 2001
    Posts
    746

    Default

    You should be able to use a cPAddon to package the plugin in a way that it is accessible to all cPanel users but also secure: http://www.cpanel.net/docs/cpaddons/

Similar Threads & Tags
Similar threads

  1. Trying to run Clean Backups Plugin - Getting Error
    By eleven11 in forum Optimization
    Replies: 0
    Last Post: 05-11-2010, 09:02 AM
  2. Possible to run auto-add cron task with WHM plugin?
    By electric in forum cPanel Developers
    Replies: 2
    Last Post: 11-11-2009, 10:38 AM
  3. how to run plugin
    By kamlesh_chaube in forum New User Questions
    Replies: 1
    Last Post: 06-01-2009, 07:53 AM
  4. Need to run own scripts as root
    By metal_cd in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 10-03-2005, 03:18 AM
  5. Cron <root@server> root run-parts /etc/cron.hourly
    By vishal in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 11-29-2003, 09:47 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube