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.

When cpanel creates a new site public_html has the wrong permissions

Discussion in 'General Discussion' started by mpascal, Aug 13, 2013.

  1. mpascal

    mpascal Member

    Joined:
    Dec 30, 2012
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    When cpanel creates a new site, it creates public_html owned by user/user and permissions 750
    (by user/user I mean user/group and the group has the same name as the user)

    The site won't display that way.
    It shows
    It will only work if public_html has
    user/nobody and permissions 755
    or
    user/user and permissions 755
    (the first is the officially recommended way but the second will work too)

    OK so I figured out how to fix it for each new site but I still don't know why cpanel creates new sites with the wrong permissions to begin with.

    I've seen numerous posts about fixing the permissions after the sites have been created but I haven't seen any about creating sites with the correct permissions from the start.

    I use the latest version of WHM with SuPHP. At site creation some files are copied from the skeleton.

    Marino
     
    #1 mpascal, Aug 13, 2013
    Last edited: Aug 13, 2013
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,762
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    The following permissions/ownership values are configured for the public_html directory during account creation when suPHP is enabled:

    Permissions: 0750
    Ownership: Username:Nobody

    This changes to the following when you have mod_ruid2 enabled:

    Permissions: 0750
    Ownership: Username:Username

    Are you sure there are no custom applications installed (e.g. Nginx, LiteSpeed) that could be preventing the website content from loading? Do you notice any specific errors in the Apache error log (/usr/local/apache/logs/error_log)?

    Thank you.
     
  3. sahostking

    sahostking Well-Known Member

    Joined:
    May 15, 2012
    Messages:
    300
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Cape Town, South Africa
    cPanel Access Level:
    Root Administrator
    Hi,

    Just to bring this up again.

    I have suPHP and suExec enabled.

    I always noticed that permissions were wrong but sites seem to load which is strange.

    I did enable mod ruid2 before but uninstalled and disabled it last year already.

    I still get permissions as:

    Permissions: 0750
    Ownership: Username:Username

    Anyway to fix this?
    I've already run /scripts/upcp --force and reran easyapache numoerous times.

    I'm using Litespeed, CloudLinux with CageFS but do not think that is the cause.
     
    #3 sahostking, Nov 13, 2014
    Last edited: Nov 13, 2014
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,762
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Feel free to open a support ticket using the link in my signature so we can take a closer look. You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
Loading...

Share This Page