I have Ubuntu 12.04 installed.
I have Eclipse Indigo installed.
I have LAMP installed, with the localhost being /var/www.
However, my Eclipse workspace location is /workspace.
How can I change it to /var/www same as localhost for the reasons of when I set up a project, the folder automatically is viewable via localhost on the browser.
I have tried just setting up a second workspace to /var/www. But it gives me the error:
The folder /var/www/.metadata is read-only
Best Answer
This is a permissions issue. There are several workarounds for that.
sudo chmod 777 /var/www
: Works definitely if its a permissions issue, but to be used with caution. It is not advisable, since that would be compromising security.ls -l /var |grep www
, look at the group, and add yourself to that group, and thensudo chmod g+rwx /var/www
. you may also create a new group and add yourself to it, thensudo chgrp <newGrp> /var/www
and thensudo chmod g+rwx /var/www
sudo chown <yourUserName> /var/www
: Better than 777'ing, but not so elegant.If you have a choice, I recommend the second one. Its the most elegant way.