Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Plugin permissions

Discussion in 'cPanel Developers' started by bamnet, Jun 14, 2009.

  1. bamnet

    bamnet Member

    Feb 7, 2005
    Likes Received:
    Trophy Points:
    I'm working on creating a plugin to replace the Ruby on Rails interface included in CPanel with my own simplified version developed for Passenger/mod_rails.

    I'm wondering what the best way to get a plugin to write/create a file like /usr/local/apache/conf/userdata/std/2/username/domain/rails.conf is? I've tried just having my php script use mkdir (since the directory structure doesn't exist for all users) and fopen but since the script runs as the user it doesn't have permission to do any writing.
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Nov 29, 2006
    Likes Received:
    Trophy Points:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    The safest way to implement this may be with setuid files that run with authentication and allow only the operations that need to be performed.

    There are many different ways to go about this implementation - but the underlaying fact from a cPanel plug-in perspective is that anything in the cPanel interface is running as that user, not root.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice