views:

22

answers:

2

So I'm pretty new to Ubuntu and even newer to Eclipse. I am trying to get started with the PHP MVC framework, CodeIgnitor. I am using the following article to setup my dev environment: http://hetal.wordpress.com/2009/09/04/working-with-eclipse-and-code-igniter/

I am trying to add the CI 'System' folder to a new project in Eclipse. I am doing this by selecting 'New Php Project' and then 'Create project from existing source'. I am pointing it to the system folder as instructed.

I get an an error: Parent of resource: /var/www/CI/System/.project is marked read-only.

The details says, "Permission Denied".

I have tried running Eclipse using gksudo but then I don't have PHP plugins installed etc.

+1  A: 

It's saying that it only has read access to the /System/ folder, and therefore it does not have permission to write the .project file.

chmod the /System/ directory and try to import it into Eclipse again.

chmod og=rw /var/www/CI/System/
/* Gives the owner & group read & write access */
Dolph
A: 

You're attempting to have Eclipse write files (i.e. the Eclipse .project) to a directory that it doesn't have permission to do so. It appears you're trying to write to the actual /var/www/ directory.

Normally the way I do it is to have CodeIgnitor in my development directory/eclipse workspace and then make a soft-link in the /var/www/ that points to the Code Ignitor I have setup in my development environment.

In response to comment

%> cd /var/www/
%> ln -s /home/jsmith/eclipse/workspace/CodeIgnitor CI

This will create a soft link named /var/www/CI that points to the CodeIgnitor you have in your home directory. (or where ever you typically put your development files) This will allow the web server to serve and use the CodeIgnitor files that are under your control in your directory which you have full permissions on.

RC
"Make a link in the /var/www/ that points to the Code Ignitor I have setup." - Can you explain what you mean by create a link?
Nick
Moved my comment into my answer so it would format properly.
RC
Educational. Thank you!
Nick