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!

401 Access Denied on cPanel resources

Discussion in 'General Discussion' started by alohamike, Aug 10, 2018.

  1. alohamike

    alohamike Registered

    Joined:
    Aug 10, 2018
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    sd
    cPanel Access Level:
    Root Administrator
    This happens only to some accounts on the server.

    When accessing cpanel, after logging in, the cpanel appears unstyled, after checking Chrome dev tools, I noticed that every requested resource has a 401 access denied response code. If I click on any link I am automatically sent back to the login page which means somehow cpanel logs me out before it even completes sending the first page. Any ideas what could be causing this? I tried switching the problematic accounts from x3 to paper lantern but the issue doesn't go away.


    I have tried running :
    Code:
    # /usr/local/cpanel/scripts/upcp --force
    with no success

    is there a fix?

    anybody?
     
    #1 alohamike, Aug 10, 2018
    Last edited by a moderator: Aug 21, 2018
  2. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,141
    Likes Received:
    474
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @alohamike

    When the issue occurs are there any errors output to the cPanel error logs? These can be found at:
    Code:
    /usr/local/cpanel/logs/error_log
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. alohamike

    alohamike Registered

    Joined:
    Aug 10, 2018
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    sd
    cPanel Access Level:
    Root Administrator
    [2018-08-13 16:47:10 -0700] warn [show_template] Failed to setup COMPILE_DIR: “/var/cpanel/userhomes/cpanellogin/template_compiles” and “/var/cpanel/userhomes/cpanellogin/” are not writable at /usr/local/cpanel/Cpanel/Template/Unauthenticated.pm line 66.

    Cpanel::Template::Unauthenticated::new("Cpanel::Template::Unauthenticated") called at base/show_template.stor.pl line 118
     
  4. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,141
    Likes Received:
    474
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    HI @alohamike

    Are you using custom templates or 3rd party software such as WHMCS?

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. alohamike

    alohamike Registered

    Joined:
    Aug 10, 2018
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    sd
    cPanel Access Level:
    Root Administrator
    no third party templates or WHMCS
     
  6. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,141
    Likes Received:
    474
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @alohamike

    Ok, I have seen this a couple of times in tickets internally and I'm curious whether or not there is more to the issue as those users had customizations or where using the older xml-api which was removed from the product in v74.
    Can you please open a ticket using the link in my signature? Once open please reply with the Ticket ID here so that we can update this thread with the resolution once the ticket is resolved.


    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. alohamike

    alohamike Registered

    Joined:
    Aug 10, 2018
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    sd
    cPanel Access Level:
    Root Administrator
    thanks Lauren!

    I logged in to cpanel of the account using my hostname.com/cpanel vs the account.com/cpanel - Hostname is not affected while the account is.

    of an *affected account
     
    #7 alohamike, Aug 14, 2018
    Last edited by a moderator: Aug 21, 2018
  8. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,141
    Likes Received:
    474
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    HI @alohamike

    If/when you open a ticket that information will be really important to the analysts. If you link the ticket ID here I'll note it with that information.

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. alekstrust

    alekstrust Registered

    Joined:
    Feb 23, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Meh
    cPanel Access Level:
    Root Administrator
    Any ideas about this? I'm having the same issue.

    Also, when using webmail.example.com and example.com/webmail on mobile, sometimes I get 404 after login. hostname:2096 works fine.
     
  10. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,141
    Likes Received:
    474
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @alekstrust


    Are you using any 3rd party plugins/software? If not, can you please open a ticket using the link in my signature? Though I did request the OP open a ticket, it doesn't appear that they did so we didn't get a chance to take a more detailed look into the issue.
    Once open please reply with the Ticket ID here so that we can update this thread with the resolution once the ticket is resolved.


    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. InterServed

    InterServed Well-Known Member

    Joined:
    Jul 10, 2007
    Messages:
    263
    Likes Received:
    4
    Trophy Points:
    68
    cPanel Access Level:
    DataCenter Provider
    Hello,

    I also encountered this lately , on v11.74.0.5 :

    [2018-08-22 15:58:59 +0300] warn [show_template] Failed to setup COMPILE_DIR: “/var/cpanel/userhomes/cpanellogin/template_compiles” and “/var/cpanel/userhomes/cpanellogin/” are not writable at /usr/local/cpanel/Cpanel/Template/Unauthenticated.pm line 66.
    Cpanel::Template::Unauthenticated::new("Cpanel::Template::Unauthenticated") called at base/show_template.stor.pl line 118

    Using afterlogic webmail as a 3rd party.
     
  12. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,141
    Likes Received:
    474
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi InterServed

    Can you replicate it reliably? If you disable afterlogic does it continue to occur?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. shmeg

    shmeg Registered

    Joined:
    Dec 9, 2012
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I am getting the same:
    [2018-08-24 14:10:09 +1000] warn [show_template] Failed to setup COMPILE_DIR: “/var/cpanel/userhomes/cpanellogin/template_compiles” and “/var/cpanel/userhomes/cpanellogin/” are not writable at /usr/local/cpanel/Cpanel/Template/Unauthenticated.pm line 66.
    Cpanel::Template::Unauthenticated::new("Cpanel::Template::Unauthenticated") called at base/show_template.stor.pl line 118

    results in a blank webmail page and disruption to cpanel access
     
  14. InterServed

    InterServed Well-Known Member

    Joined:
    Jul 10, 2007
    Messages:
    263
    Likes Received:
    4
    Trophy Points:
    68
    cPanel Access Level:
    DataCenter Provider
    I have removed AfterLogic Webmail last night , and just checked the logs again now , still seeing that error:

    Code:
    2018-08-24 14:48:15 +0300] warn [show_template] Failed to setup COMPILE_DIR: “/var/cpanel/userhomes/cpanellogin/template_compiles” and “/var/cpanel/userhomes/cpanellogin/” are not writable at /usr/local/cpanel/Cpanel/Template/Unauthenticated.pm line 66.
    [2018-08-24 14:48:15 +0300] warn [show_template] Failed to setup COMPILE_DIR: “/var/cpanel/userhomes/cpanellogin/template_compiles” and “/var/cpanel/userhomes/cpanellogin/” are not writable at /usr/local/cpanel/Cpanel/Template/Unauthenticated.pm line 66.
    [2018-08-24 15:03:05 +0300] warn [show_template] Failed to setup COMPILE_DIR: “/var/cpanel/userhomes/cpanellogin/template_compiles” and “/var/cpanel/userhomes/cpanellogin/” are not writable at /usr/local/cpanel/Cpanel/Template/Unauthenticated.pm line 66.
    Code:
    stat /var/cpanel/userhomes/cpanellogin/template_compiles
      File: ‘/var/cpanel/userhomes/cpanellogin/template_compiles’
      Size: 4096            Blocks: 8          IO Block: 4096   directory
    Device: fd00h/64768d    Inode: 1576609     Links: 3
    Access: (0700/drwx------)  Uid: (  991/cpanellogin)   Gid: (  988/cpanellogin)
    Access: 2018-08-23 00:03:24.904460731 +0300
    Modify: 2017-09-07 00:12:11.691442991 +0300
    Change: 2017-09-07 00:12:11.691442991 +0300
    ----
    stat /var/cpanel/userhomes/cpanellogin/
      File: ‘/var/cpanel/userhomes/cpanellogin/’
      Size: 4096            Blocks: 8          IO Block: 4096   directory
    Device: fd00h/64768d    Inode: 1573702     Links: 3
    Access: (0711/drwx--x--x)  Uid: (  991/cpanellogin)   Gid: (  988/cpanellogin)
    Access: 2018-08-23 00:03:24.901460653 +0300
    Modify: 2017-09-07 00:12:11.684442890 +0300
    Change: 2018-08-21 05:17:22.377581466 +0300
    
    
     
  15. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,141
    Likes Received:
    474
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hello,


    Can one or anyone experiencing this go to WHM>>Server Configuration>>Tweak Settings and let me know if any of the the webmail selections are present? It looks like we were able to get access to a server to investigate further (which is why I had requested someone open a ticket originally) as a result we opened a case in relation to it CPANEL-22363

    Basically, all tweak settings options in some instances are being reset to 0 - I'd like to know if this is occurring on your server/s as well. If not I will need you to open a ticket so that we can investigate further.

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
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