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 permissions

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

  1. bamnet

    bamnet Member

    Joined:
    Feb 7, 2005
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    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

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    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.
     
Loading...

Share This Page