Q:

Setting up shared development machine

I have a server machine that contains 10 users. OS: Ubuntu 12.04.3 LTS 64bit
These users are developers (mainly web developers: HTML+JS+PHP+MYSQL)
I allowed them to remote login through XRDP and VNC.
Now everything works fine but the problem in /var/www
What is the suitable permission for this directory so they don't have problems while sharing some code between them although they aren't root. All of them are simple users.
I need to know if there is a secure way of letting them share source code and at the same time each one have its own repository. I welcome any idea.

A:

Another Method (due to the bounty :))
You can do it this way if you don't want to keep all users in the same webroot. You can make different directories as webroot aliases for the /var/www/ directory. Suppose you h ave two users u1 and u2. 
I supposed you already installed apace2 if not do it sudo apt-get install apache2
I'll make the directories /home/u1/web  and /home/u2/web to be the webroot of the users u1 and u2.
sudo chmod 775 home/u1/web
sudo chmod 775 home/u2/web

sudo gedit /etc/apache2/sites-available/default

Create alias (add the following to the file ) for the user u1:
Alias /u1 /home/u1/web
<Directory /u1>
    Options All
    AllowOverride All
    order allow,deny
    allow from all
</Directory>

Create alias (add the following to the file ) for the user u2:
Alias /u2 /home/u2/web
<Directory /u1>
    Options All
    AllowOverride All
    order allow,deny
    allow from all
</Directory>

Now Each user can access his web root by pointing your web browser to localhost/u1 for user u1 and localhost/u2 for user u2

