I basically want to create an Eclipse workspace that can be accessed between accounts on my Mac. I’m currently running Mac OS X v10.7.1. The other caveat is that I want to be able to do use Git on that workspace so I can push and pull from both accounts. If this is not possible, I’m ok with switching accounts to do the Git stuff.
Is it possible to create an Eclipse workspace that can be accessed between 2 accounts in Mac OS X Lion? Do both accounts need to be admin or not? If this is actually possible, how would I go about setting this up?
Here’s some more info about my accounts (both admin, I think?)…
$ id HristoOskov
uid=501(HristoOskov) gid=20(staff) groups=20(staff),403(com.apple.sharepoint.group.2),404(com.apple.sharepoint.group.3),402(com.apple.sharepoint.group.1),401(com.apple.access_screensharing),12(everyone),33(_appstore),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),98(_lpadmin),100(_lpoperator),204(_developer)
$ id dev
uid=502(dev) gid=20(staff) groups=20(staff),403(com.apple.sharepoint.group.2),404(com.apple.sharepoint.group.3),402(com.apple.sharepoint.group.1),502(access_bpf),401(com.apple.access_screensharing),12(everyone),33(_appstore),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),98(_lpadmin),100(_lpoperator),204(_developer)
… and how the directory that I want to have Eclipse use as a workspace…
$ ll
drwxr-xr-x 4 dev staff 136 Sep 16 18:38 .
drwxr-xr-x+ 39 dev staff 1326 Sep 17 03:59 ..
drwxr-xr-x 4 dev admin 136 Sep 17 03:24 myWorkspace
What I’ve tried…
So I tried making the directory that I want to put the workspace in owned by root but then Eclipse complains when I try to create a project…
Creation Problems
Parent of resource: /Users/HristoOskov/Sites/random is marked as read-only.
Then I realized that I didn’t clear out the directory properly before trying to create a workspace. Now, I have fully cleared the destination directory and I tried to create a workspace again and am faced with this error…

Figured it out! Here are the permissions for the workspace…
The trick is opening Eclipse as root. This is the command I use to do so…
… and this runs an Eclipse instance as root and I can access the workspace from both accounts!
I can even still work with Git, however, I must do
sudo git [command]every time… but I’m ok with that.