phpmyadmin giving 401 Access Denied error

ryaneastland

Member
Jun 22, 2014
5
0
1
cPanel Access Level
Reseller Owner
Hi I just setup cpanel on my VPS with centos 6.5 x64 I changed the home directory to /mnt/hosting so that the websites could be stored on another server with more HHD space now I went to get my website working inside of it and phpmyadmin wont open and gives 401 Access Denied
a7eddabe48.png
Could anyone help me I really need to get everything setup as soon as possible
Thanks in advance
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
Hello :)

How is the secondary drive mounted, and how did you transfer the accounts to that drive? Do you notice any errors in /usr/local/cpanel/logs/error_log when attempting to access phpMyAdmin?

Thank you.
 

ryaneastland

Member
Jun 22, 2014
5
0
1
cPanel Access Level
Reseller Owner
I mounted the sshfs drive then made the accounts

I dont know what Im exactly looking for as a error so heres part of the log for today
[removed]
 
Last edited by a moderator:

JaredR.

Well-Known Member
Feb 25, 2010
1,834
24
143
Houston, TX
cPanel Access Level
Root Administrator
Please refrain from linking to external sites for logs or screenshots. You can paste your log excerpt directly into the forum post and wrap it with CODE tags. If you click the "Go Advanced" button, you will see a button for CODE tags. It looks like a pound sign (#). CODE tags preserve spacing and use a fixed-width font, so the output looks just like on your display.

For very long log excerpts, you can add them to forum replies as attachments.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
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.
 

ryaneastland

Member
Jun 22, 2014
5
0
1
cPanel Access Level
Reseller Owner
The problem was that the users tmp directory wasn't owned by them it was owned by root chowning the folder to the user fixed it but still didn't fix the problem when a new user is created so what I did was make a postwwwacct script that chowned the users tmp dir after the account was made
Code:
#!/usr/bin/php -q
<?php
$opts = array();
$argv0 = array_shift($argv);
while(count($argv)) {
$key = array_shift($argv);
$value = array_shift($argv);
$opts[$key] = $value;
}
$user_name=$opts['user'];
$path="/mnt/hosting/" . $user_name . "/tmp";
chown($path, $user_name);
?>
Theres the code if anyone runs into the same problem