I am using lamp on my computer for development only.The problem is that i can not make any changes to it because the owner in root.How could i change the permissions to it.Its realy frustrating.
Changing the ownership and permissions of system files is not a good idea and can result in this particular case you may be able to "get away" with this change, in general changing ownership and permissions on system files is asking for problems ranging from security to system failures.
You should edit the files as root
If you do not have root access talk to your system administrator.
See https://wiki.ubuntu.com/RootSudo for further information.
You can change the owner of file once and then make changes to it as you do to any other file you own. You need to run:
To make sure any user on system can read (but not edit it):
I assume you're working/testing a particular application and need the PHP configuration to be changed for that, and in this case you can simply "Sudo" edit that.
If you installed a stack version using either Tasksel or aptitude, the wollowing will work
If you like you can use gedit as well.
However, if you want to edit/make frequent changes, you can change the file ownership to the userid you use during your development.
You can use,
oli_dev being your user name and /etc/php5/apache2/php.ini being your primary php configuration file.
In case you're unsure of the php.ini file used by your interpreter, use phpinfo() inside a test script and call it in browser. It should help you locate the configuration file loaded.
Hope this helps, plz do revert if you need more assistance.