Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Member java_dude's Avatar
    Join Date
    Apr 2004
    Location
    The Good Ol' U.S. of A.
    Posts
    28

    Default Changing VirtualHost User and Group?

    Hey guys, I'm currently running PHP as a DSO, which is working well performance-wise, but I've run into some permission issues... for example, the CMS on my site needs to create/update/unpack files during upgrades, and later I need to update them via FTP. Obviously this causes an issue because the files are owned by the default Apache user and not the Cpanel/FTP user.

    I've been considering installing FastCGI, but it seems like overkill in my situation - this is a dedicated box which only hosts my site, and I don't host other people's websites. I do have multiple subdomains, but they're all under the same Cpanel account.

    I was reading up on some Apache directives and immediately the "User" and "Group" directives stand out and seem like they might do the trick. Can I simply set these directives in each vhost in httpd.conf (or use an include file) to use the Cpanel account owner's username to simplify the permission/ownership issues?

    Thanks!

  2. #2
    cPanel Staff cPanelMichael's Avatar
    Join Date
    Apr 2011
    Posts
    1,346
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Changing VirtualHost User and Group?

    Hello

    FCGI is only recommended for advanced administrators who understand how to tune the performance of mod_fcgid.

    Have you considered using suPHP as the default handler for PHP? PHP scripts will be executed by the user who owns the VirtualHost serving the request when suPHP is enabled. More information on this can be found at:

    Apache PHP Request Handling

    Thank you.
    cPResources: Support Options - Submit a ticket here - Additional Support Options - Forums Search - Mailing Lists - Documentation - Migration Services
    -- cPanelMichael - Migration Specialist, Technical Analyst, cPanel Technical Support

  3. #3
    Member java_dude's Avatar
    Join Date
    Apr 2004
    Location
    The Good Ol' U.S. of A.
    Posts
    28

    Default Re: Changing VirtualHost User and Group?

    Hi Michael, the problem with SuPHP is the performance - I run a high traffic site, and I need to use the most efficient method of doing this. I'd much prefer to run PHP as a DSO, if it's possible to simply change the "User" and "Group" directives in my vhosts. But if that's not possible, it seems like the second best way to do this is with FastCGI.

    Is it possible to just change the user and group per vhost to get the desired effect, or is it really necessary to run SuPHP/FCGI?

    Thanks!

Similar Threads & Tags
Similar threads

  1. Changing Chown User/Group
    By h0tmailz in forum cPanel and WHM Discussions
    Replies: 9
    Last Post: 04-21-2009, 02:27 PM
  2. Unable to login to cPanel after changing user group
    By bakhlawa in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-01-2008, 06:12 PM
  3. Replies: 2
    Last Post: 12-21-2007, 01:14 PM
  4. [Q] Changing group on files&directories to the apache group
    By tekenen in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 08-02-2004, 09:01 AM
  5. Group ownership of files mysteriously changing
    By tabernack in forum cPanel and WHM Discussions
    Replies: 9
    Last Post: 11-04-2001, 08:32 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube