Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Oct 2003
    Location
    seattle
    Posts
    50

    Default Need to run a shared Perl script

    I need to provide all users access to a series of Perl scripts in some kind of shared location but I cannot find a way to work around suexec. I found a couple of mentions on the forum but they are all OLD and didn't seem to resolve anything to anyone's satisfaction. Here's one from 3 years ago:

    http://forums.cpanel.net/showthread....ed+perl+script

    I'm running Release on CentOS 4.5 and 5 with a fairly "cPanel stock" Apache 1.3.3.6 with mod_auth_mysql added. I'm willing to give the configuration in the above post a shot, but I'm wondering if it is still valid in CP11? There doesn't seem to be anyone but root in the wheel group these days, probably for good reason. Do I need to create a whole new user for this?

    I'd also like to know if aliasing a directory to another directory negates the ability to run scripts in the original one, like mounting another file system over an existing directory full of files. (I want to have the option of overriding the shared copy with a local copy on one or two accounts so I can do prototyping and to accommodate special mods) Since these are all working store systems, I want to make sure that creating the alias isn't going to kill all the current local copies.

    These scripts currently have individual copies in each user's "cgi" folder (not cgi-bin) and I want to run them all from /home/cgi so I can update them all at once instead of doing each one individually. (there are hundreds of users) I love suexec because I can see exactly which account my Perl scripts are running on but it sure makes this shared thing a pain
    wwww.themothership.net
    Webhosting for Musicians

  2. #2
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    IIRC, you should be able to do this using an Alias in httpd.conf pointing to a shared directory owned by root:wheel - this is how cPanel achieves this with their cgi-sys shared scripts in /usr/local/cpanel/cgi-sys/
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  3. #3
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Oct 2003
    Location
    seattle
    Posts
    50

    Default

    I don't think they do it that way anymore. There is only one user in the wheel group by default now - root. For testing purposes, I added one user to the wheel group and I'm working from that hosting space. I've tried this over and over with all kinds of permissions for both the directory and the script - 0711, 0755, 4711, 4755, 6711, 6755

    If I have indexes on, I can "see" the script in the aliased directory in a web browser pointed at the user's domain, but with root:wheel ownership on either/both the directory & file, clicking the file name throws a 500 error. If I chown both directory and file to user:user, it runs as expected from the alias

    I don't have user shells enabled on my servers so I can't test it from the command line as the user, but I wouldn't be surprised if it works fine as root:wheel. The issue seems to be apache and suexec.
    wwww.themothership.net
    Webhosting for Musicians

Similar Threads & Tags
Similar threads

  1. How to run Perl CGI script
    By rgaut in forum New User Questions
    Replies: 4
    Last Post: 09-02-2007, 06:06 PM
  2. Replies: 3
    Last Post: 03-29-2007, 04:31 AM
  3. Perl cgi's now need -w or -U to run
    By jcarey in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 08-25-2006, 07:45 PM
  4. Can't run perl Logwatch anymore
    By xwing777 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 12-27-2004, 05:21 PM
  5. perl scripts wont run
    By EMS in forum cPanel and WHM Discussions
    Replies: 16
    Last Post: 11-14-2003, 06:17 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube