#1 (permalink)  
Old 06-14-2009, 11:14 PM
Registered User
 
Join Date: Feb 2005
Posts: 15
bamnet is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-23-2009, 03:05 PM
cPanelDavidG's Avatar
cPanel Technical Sales
 
Join Date: Nov 2006
Location: Houston, TX
Posts: 7,995
cPanelDavidG is on a distinguished road
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.
__________________
Want our technical analysts to login to your server to assist you? You can contact our technical analysts at: http://tickets.cPanel.net/submit
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Smarty Plugin cyexx cPanel and WHM Discussions 2 02-17-2009 10:16 AM
new plugin phphantom cPanel Newbies 0 02-12-2008 04:51 PM
Plugin API 22chris22 Developer Discussions 1 02-04-2008 10:43 AM
WHM plugin sehh Developer Discussions 3 12-03-2007 01:09 PM
ASP Plugin Sam cPanel and WHM Discussions 1 11-15-2001 11:47 AM


All times are GMT -5. The time now is 03:35 PM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© cPanel Inc