Skip to main content

cPanel skeleton -> wrong permission on public_html dir upon account creation

Comments

13 comments

  • quietFinn
    AFAIK the correct permissions of the public_html directory is 750, and the correct user:group is CPANELUSERNAME nobody.
    0
  • quizknows
    [quote="quietFinn, post: 1562872">AFAIK the correct permissions of the public_html directory is 750, and the correct user:group is CPANELUSERNAME nobody.
    That is correct. Public_html should be 750. If you're getting the directory index forbidden you might just have Options -indexes in your htaccess or have indexes unselected in the apache options in WHM. Try putting a file in there owned by the user named index.html and see if it loads.
    0
  • quietFinn
    [quote="quizknows, post: 1562912">That is correct. Public_html should be 750. If you're getting the directory index forbidden you might just have Options -indexes in your htaccess or have indexes unselected in the apache options in WHM. Try putting a file in there owned by the user named index.html and see if it loads.
    In public_html 750 does not work if both user & group are CPANELUSERNANE, group must be the user Apache is using, i.e. nobody.
    0
  • quizknows
    I said you were correct about owner/group, I was not contridicting your statements. Yes, it should be user:nobody, 750 as you stated. With that information, the original poster should just need to change group ownership to 'nobody' (the Apache user).
    0
  • cPanelMichael
    [quote="jannohordijk, post: 1562652">After chmod 644 the site shows normally.
    Hello :) The previous posts are accurate. Please let us know if using the correct permission/ownership values on the public_html directory makes a difference. Note that you can troubleshoot the error message directly by reviewing /usr/local/apache/logs/error_log when you notice the error in your browser. Thank you.
    0
  • jannohordijk
    [quote="quietFinn, post: 1562872">AFAIK the correct permissions of the public_html directory is 750, and the correct user:group is CPANELUSERNAME nobody.
    I use suphp and suEXE and I thought they don't allow groupname nobody? But how do I tell CPanel to create the public_html dir with CPANELUSERNAME:nobody permissions? Best regards, Janno
    0
  • quietFinn
    [quote="jannohordijk, post: 1564102"> But how do I tell CPanel to create the public_html dir with CPANELUSERNAME:nobody permissions?
    You don't have to, cPanel uses those setting by default.
    0
  • jannohordijk
    Re: CPanel skeleton -> wrong permission on public_html dir upon account creation [quote="quietFinn, post: 1564122">You don't have to, cPanel uses those setting by default.
    No, unfortunately not: as I wrote earlier these are the settings directly after creating a new account: drwxr-x--- 3 imedianu imedianu 4096 Jan 29 13:33 public_html [COLOR="silver">- - - Updated - - - [quote="cPanelMichael, post: 1563582">Hello :) Note that you can troubleshoot the error message directly by reviewing /usr/local/apache/logs/error_log when you notice the error in your browser.
    Here is the error in the error_log [Tue Feb 04 20:41:49 2014] [crit] [client 77.250.118.201] (13)Permission denied: /home/imedianu/public_html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
    0
  • cPanelMichael
    Hello :) Could you verify if you have installed Mod_Ruid2 on this system? Thank you.
    0
  • jannohordijk
    [quote="cPanelMichael, post: 1564142">Hello :) Could you verify if you have installed Mod_Ruid2 on this system? Thank you.
    No I haven't. Is that neccessary? I have suEXE and suPHP installed.
    0
  • cPanelMichael
    It's not necessary but it would explain why the default group ownership for the public_html directory was configured as the account username. Could you 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.
    0
  • jannohordijk
    [quote="cPanelMichael, post: 1565741">It's not necessary but it would explain why the default group ownership for the public_html directory was configured as the account username. Could you 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.
    I just did! Best regards, Janno
    0
  • cPanelMichael
    [quote="jannohordijk, post: 1569562">I just did! Best regards, Janno
    Feel free to post the ticket number here so we can update this thread with the outcome. Thank you.
    0

Please sign in to leave a comment.