PhpMyAdmin "Wrong permissions on configuration file, should not be world writable!"
UbuntuPhpmyadminUbuntu Problem Overview
I get this error when I try to access localhost/phpmyadmin:
Wrong permissions on configuration file, should not be world writable!
I have already chmoded every file to 555 from 777. What should I do next? I run Ubuntu 11.04.
Ubuntu Solutions
Solution 1 - Ubuntu
Try this it will work
sudo chmod 755 /opt/lampp/phpmyadmin/config.inc.php
Solution 2 - Ubuntu
Try
sudo chmod 755 /opt/lampp/phpmyadmin/config.inc.php
This command fixed the issue having on my Ubuntu 14.04.
Solution 3 - Ubuntu
This is because of wrong permission of phpMyAdmin
directory and the file config.inc.php
On *nix like OS set the permission of the directory and the file as follows
chmod -R 755 /path/to/phpMyAdmin
chmod 644 /path/to/phpMyAdmin/config.inc.php
If like me you run a Linux Virtual Machine which mount a Windows folder where phpMyAdmin
sources are located, edit config.inc.php
and add this line
$cfg['CheckConfigurationPermissions'] = false;
Solution 4 - Ubuntu
This worked for me: $ pkexec chmod 755 -R /etc/phpmyadmin
Solution 5 - Ubuntu
You should not be making them 777
(which is writeable by everyone). Try 644
instead, which means user has read and write and group and others can only read.
Solution 6 - Ubuntu
For Mac OS users:
Find the file named config.inc.php, usually located in /Applications/XAMPP/xamppfiles/phpmyadmin/config.inc.php
(this is the filepath on my Mac)
Then click the right mouse click -> Click on Get Info, at the bottom of the box you will find permissions-> click on the Lock icon (bottom right corner) -> Put your System Admin Password -> -> where it says everyone, modify this permission to READ ONLY -> click back on the Lock icon and try to open
Solution 7 - Ubuntu
Just in case, someone out there having same issue but changing file permission doesn't solve the issue, add this line to your config.inc.php
file
<?php
// other config goes here . . .
$cfg['CheckConfigurationPermissions'] = false;
And you're good to go.
In my case, I'm using windows 10 WSL with phpmyadmin installed on D:
drive. There's no way to (for now) change file permission on local disk through WSL unless your installation directory is inside WSL filesystem it-self. There's updates according to this issue, but still on insider build.
Cheers.
Solution 8 - Ubuntu
I just solved this problem myself, and this question/answer pair was not helpful to me in particular, so I will add what solved it for me in my specific case.
For starters, I have just began to use a repository so I "chmod 777 -R
"'ed my entire /opt/lampp directory to make sure that permissions were not an issue for the pushing of the repository. Then I got two errors, but I think I only saw one of them and the next one showed up after fixing the first one it. I suppose one error was upstaging the other.
The first one was ./lampp/etc/my.cnf A chmod 700 on that file fixed it in my case although, 755 seems to be the better choice that I found in my research.
One file down, one more to go. The other file, which is the one causing the specific error message in this question is ./lampp/phpmyadmin/config.inc.php.
Solution: "$ chmod 755 -R /opt/lampp/phpmyadmin
"
Solution 9 - Ubuntu
I got the same problem as you. I fixed this problem by following this post :D
But I didn't change the permission from 777 to 755 :O
Solution 10 - Ubuntu
all you need is to
-
open terminal type
opt/lampp/lampp start
to start it and then
sudo chmod 755 /opt/lampp/phpmyadmin/config.inc.php
then visit in your browser
localhost/phpmyadmin
it will work fine.
Solution 11 - Ubuntu
I run my system on top of a XAMPP instalation on a OS X.
A few days ago I faced the same problem. I was getting a lot of permission problems when installing and managing CMS test platforms, so I decided to set the entire htdocs subtree to a+rwX permissions, and got the same error.
Although my decision to set the entire subtree to those permissions is generally a mistake, that I made knowingly because this system is only accessable by localhost and otherwise unreachable, the only file that needs permission changing to solve this issue is config.inc.php, and you can leave the rest with the permissions you think you need.
The problem is fixed with:
chmod 644 config.inc.php, or sudo chmod 644 config.inc.php, depending on the system.
(issued inside the phpmyadmin folder)
Solution 12 - Ubuntu
This error occured because phpmyadmin directory has all permissions (777). you can resolved this problem by executing the following command.
sudo chmod 755 /opt/lampp/phpmyadmin/config.inc.php
Solution 13 - Ubuntu
For Mac sudo chmod 755 /Applications/XAMPP/xamppfiles/phpmyadmin/config.inc.php Worked for me
Solution 14 - Ubuntu
Do the following in your terminal
sudo chmod 755 /opt/lampp/phpmyadmin/config.inc.php
After this you have to restart your server
Solution 15 - Ubuntu
try if install lampp
sudo chown www-data:www-data -R /opt/lampp/phpmyadmin/*
sudo chown www-data:www-data -R /opt/lampp/phpmyadmin
or if install phpmyadmin
sudo chown www-data:www-data -R /etc/phpmyadmin/*
sudo chown www-data:www-data -R /etc/phpmyadmin
Solution 16 - Ubuntu
What the hell? errors say that the file should not be 755 but everyone says should be 755
.
You should change the permission of the file into 444 to protect it from the edit.
run this command:
sudo chmod 444 /opt/lampp/phpmyadmin/config.inc.php
Solution 17 - Ubuntu
Mac/ MAMP:
sudo chmod -R 755 /Applications/MAMP/bin/phpMyAdmin
worked for me.
Solution 18 - Ubuntu
On My Mac using XAMPP i simply did
sudo chmod 755 /Applications/XAMPP/xamppfiles/phpmyadmin/config.inc.php
Solution 19 - Ubuntu
These problem arises due to permission we can't give the all permission of our database config
If you are using ubuntu and you have the path like this /opt/lampp
then type the following command in terminal.
sudo chmod 755 /opt/lampp/phpmyadmin/config.inc.php
Solution 20 - Ubuntu
To restrict access on this file /phpmyadmin/config.inc.php and he will work.
Simple tape this : sudo chmod 750 /phpmyadmin/config.inc.php
!
Solution 21 - Ubuntu
If you are using ubutu and you have the path like this /opt/lampp then type the following command in terminal.
sudo pkexec chmod 755 -R /opt/lampp/phpmyadmin
Hope this will find out your solution.
Solution 22 - Ubuntu
you should change the owner of the server
by chown
command
from home you can run this command
sudo chown {userName} -R ../../opt
If it does not work yet, run this command
sudo chmod 777 -R ../../opt
It should work now.