0

i am new to ubuntu , i have install ubuntu 12.04 install in my system i have install localhost(lamp) in my system . i was trying to import a data base with more size so dor that i need to change the php.ini file which was there in /etc/php5/apache2/php.ini

but php.ini file was in read onely mode so i change the permission of apache2 folder like

      chmod -R 777 apache2

and now i am not able to use php myadmin , can any 1 tell me what to do ??????????????

2
  • i am getting this message when use my phpmyadmin Wrong permissions on configuration file, should not be world writable!
    – abhi
    Jan 21, 2014 at 6:48
  • hi friends i solved this by changing the permission of config.inc.php file (under phpmyadmin folder in etc ) to 755 it worked now i am able to use php myadmin
    – abhi
    Jan 21, 2014 at 7:07

2 Answers 2

2

It complains about the permissions set on the folder. With your command you gave everyone full write(!) and read permissions to every file in this folder and its sub-folders.

Run the following commands to set the permissions back:

sudo chmod a-x -R /etc/php5/apache2/
sudo chmod a-w -R /etc/php5/apache2/
sudo chmod 755 /etc/php5/apache2/
sudo chmod 644 /etc/php5/apache2/php.ini
sudo chmod 644 /etc/php5/apache2/conf.d/*

A small note:
Never use chmod -R until you exactly know what you are doing. chmod -R sets permissions recursively to every file and folder under the given path. You can destroy your entire system.

0

I would stop Apache using sudo service apache stop. Giving recursive 777 privileges is not recommended unless there is an absolute need.

Presuming that you issued that chmod command for the /etc/php5/apache2 directory, you can reset the permissions to the default. Here's the contents of the same directory on my system which is configured as a LAMP server:

lrwxrwxrwx 1 root root     9 Apr  4  2012 conf.d -> ../conf.d
-rw-r--r-- 1 root root 67479 Apr  9  2013 php.ini
-rw-r--r-- 1 root root 68428 Jun 13  2012 php.ini.ucf-dist

You would need to chmod the php.ini and php.ini.ucf.dist files with

sudo chmod 644 filename

The error you're getting from phpMyAdmin is for it's own configuration file - config.inc.php found at the root level of your phpMyAdmin installation. Managing this file is explained in the phpMyAdmin Wiki here.

To edit the php.ini file you will need to invoke sudo when using your CLI text editor like vi or pico, such as sudo pico /etc/php5/apache2/php.ini

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .