Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Feb 2005
    Posts
    15

    Question Plugin permissions

    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. #2
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    10,718
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by bamnet View Post
    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.
    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.

Similar Threads & Tags
Similar threads

  1. Replies: 24
    Last Post: 11-23-2010, 08:44 PM
  2. Possible Plugin?
    By JohnnyD1995 in forum New User Questions
    Replies: 2
    Last Post: 08-19-2010, 04:27 PM
  3. mod_security plugin
    By MACscr in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 12-03-2008, 05:58 AM
  4. new plugin
    By phphantom in forum New User Questions
    Replies: 0
    Last Post: 02-12-2008, 04:51 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube