I'm new to Linux, and only use it for surfing web until recently.

For everyone to know, I had developed a website complete with its database using WampServer on windows. And I created the all the pages using adobe dreamweaver. The site had been working perfectly.

Recently, I installed ubuntu 12.04 on my machine (dual boot with the prior windows) together with LAMP server, and I was intending to transfer my whole website pages and databases to the ubuntu platform. The LAMP server seems to be working fine.

After that I copied all the .php website files from WampServer to LAMP in the directory /var/www But when I tried to view the page through mozilla browser, it only showed blank white page, although the url showed the correct address.

Why was this happen? Did I do anything wrong during LAMP installation? The site was designed with css style, would this contribute to the problem?


Have you given www-data an access to the files you copied in /var/www/?

$ sudo chmod -R 755 /var/www/Your_Site/

or you let www-data own your site folder

$ sudo chown -R www-data /var/www/Your_Site/

  • I put the index.php file and all other files under the /var/www/ directory, do I need to sudo chmod -R 755 each .php file? – realfalah May 14 '12 at 8:09
  • Giving 755 permission for everything is not good. there is a big security issue :) – Achu May 14 '12 at 8:11
  • @realfalah No!! for php configuration files you should give 644 sudo chmod -R 644 each .php – Achu May 14 '12 at 8:12
  • No you don't have to do that in every file. -R already do that recursively. So all files under your directory will be set with 755 permission. – Barz May 14 '12 at 8:15
  • Thak you everyone! It worked! – realfalah May 14 '12 at 8:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.