I created a test.php file in the required /var/www folder but how do I edit the file ?It says it's only a read only file.Using chmod +rwx <filename> says 'no such file'...Please help .

Are you in the correct folder? Try cd /var/www first.

//in terminal
//if you are a sudoer or if you have a root prev
sudo chmod 777 -R /var/www //then enter youre password
//if you cant sudo, then be root
su //enter root password
chmod 777 -R /var/www
of if you are log in as admin, just go to /var right click to www>properties>permission tab> change all to create and delete files

do the same in test file inside www dir

and install php editor if dont have

Hey I'm the sudoer but when I type chmod -R/var/www it says '/' is an invalid option.What to do?

Add a space after the R. I don't know why you would want -R, but it needs a space after it :)

My bad !Yeah it did work.Thanks!!