Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

500 Error

Discussion in 'General Discussion' started by WSS Group, May 27, 2015.

  1. WSS Group

    WSS Group Member

    Joined:
    Mar 30, 2015
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Worldwide
    cPanel Access Level:
    Root Administrator
    I was restoring 2 accounts on server manually so I had to workout their permission. While I'm googling I found the below thread

    https://forums.cpanel.net/threads/reset-default-permissions.19350/

    Running these from SSH one by one should work;

    for CPAccess in `ls -A /var/cpanel/users`; do chown -R $CPAccess:$CPAccess /home/$CPAccess; done

    for CPAccess in `ls -A /var/cpanel/users`; do chown -R $CPAccess:mail /home/$CPAccess/etc /home/$CPAccess/mail; done

    for CPAccess in `ls -A /var/cpanel/users`; do chown -R $CPAccess:nobody /home/$CPAccess/public_html; done

    /scripts/chownpublichtmls

    Depending on how you're setup you might need these:

    find /home*/*/public_html -type d -perm 0777 -exec chmod 755 {} \;
    find /home*/*/public_html -type f -perm 0666 -exec chmod 644 {} \;

    To take care of one users account this may be all you need.

    chown -R usernamehere:usernamehere /home/user/public_html/* ;


    So I used these commands to fix the errors but unfortunately it turned to be the biggest mistake ever.

    Now all sites on site are giving error 500 I checked the error logs for most of them and

    Found they have mostly common error:
    SoftException in Application.cpp:431: Mismatch between target GID (639) and GID (99) of file

    Is there a way to reverse those commands? And fix the issue?

    Thank you!
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Check the output of "ls -al" in the account's public_html directory to ensure both user and group ownership is set to the account username.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Andrew W

    Andrew W Member

    Joined:
    Apr 3, 2015
    Messages:
    9
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    Here's a simple script from Vanessa at The cPanel Admin that can help you reset perms and ownerships to how they should be per user: http://thecpaneladmin.com/fix-account-permissions/

    That will help you with the permissions aspect of a 500 Internal Error. If the errors still exist on any of the websites also try disabling any .htaccess files by renaming them to .htaccess.deactive or something similar.
     
  4. WSS Group

    WSS Group Member

    Joined:
    Mar 30, 2015
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Worldwide
    cPanel Access Level:
    Root Administrator
    Thank you guys, problem resolved now.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice