Change workspace directory of eclipse to www

RSM

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
Mahesh

This is a permissions issue. There are several workarounds for that.

  1. 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.
  2. ls -l /var |grep www , look at the group, and add yourself to that group, and then sudo chmod g+rwx /var/www. you may also create a new group and add yourself to it, then sudo chgrp <newGrp> /var/www and then sudo chmod g+rwx /var/www
  3. 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.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related