$cfg['TempDir'] (/usr/local/CyberCP/public/phpmyadmin/tmp) is not accessible.

Hi, I installed the CyberPanel In my AWS EC2 with the oficial AMI of MarketPlace.

When I login in PHPMyAdmin I have this error:
$cfg[‘TempDir’] (/usr/local/CyberCP/public/phpmyadmin/tmp) is not accessible.

I had this issue and it was mind numbing to figure out. I hope this saves folks trouble as it cost me hours. I don’t know if it will work on AWS EC2 but below is what fixed it for me.

Here is how I fixed it for me… edit the config file /usr/local/CyberCP/public/phpmyadmin/config.inc.php

I had to change:
$cfg[‘TempDir’] = ‘tmp’;


$cfg[‘TempDir’] = ‘/tmp/’;

And that fixed the error for me on Ubuntu 20.04.2 LTS

running CyberPanel:

Current Version
Latest Version
Latest Build

Sometimes because of permission happens
sudo chown 777 -R /tmp


*** please add it under the /usr/local/CyberCP/public/phpmyadmin/ in the config.inc.php file that line
$cfg[‘TempDir’] = ‘/usr/local/CyberCP/public/phpmyadmin/tmp’;

some additional info


The normal settings for /tmp are 1777, which ls shows as drwxrwxrwt. That is: wide open, except that only the owner of a file can remove it (that’s what this extra t bit means for a directory).

The problem with a /tmp with mode 777 is that another user could remove a file that you’ve created and substitute the content of their choice.

If your /tmp is a tmpfs filesystem, a reboot will restore everything. Otherwise, run chmod 1777 /tmp.

Additionally, a lot of files in /tmp need to be private. However, at least one directory critically needs to be world-readable: /tmp/.X11-unix, and possibly some other similar directories (/tmp/.XIM-unix, etc.). The following command should mostly set things right:

chmod 1777 /tmp
find /tmp -mindepth 1 -name '.*-unix' -exec chmod 1777 {} + -prune -o -exec chmod go-rwx {} +

I.e. make all files and directories private (remove all permissions for group and other), but make the X11 sockets accessible to all. Access control on these sockets is enforced by the server, not by the file permissions. There may be other sockets that need to be publicly available. Run find /tmp -type s -user 0 to discover root-owned sockets which you may need to make world-accessible. There may be sockets owned by other system users as well (e.g. to communicate with a system bus); explore with find /tmp -type s ! -user $UID (where $UID is your user ID).