401 Access Denied on cPanel resources

alohamike

Registered
Aug 10, 2018
4
0
1
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?
 
Last edited by a moderator:

alohamike

Registered
Aug 10, 2018
4
0
1
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
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,274
1,292
313
Houston
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!
 

alohamike

Registered
Aug 10, 2018
4
0
1
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
 
Last edited by a moderator:

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,274
1,292
313
Houston
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!
 

alekstrust

Registered
Feb 23, 2017
3
0
1
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.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,274
1,292
313
Houston
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!
 

InterServed

Well-Known Member
Jul 10, 2007
273
16
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.
 

shmeg

Member
Dec 9, 2012
5
0
51
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
 

InterServed

Well-Known Member
Jul 10, 2007
273
16
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
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,274
1,292
313
Houston
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!