Saturday, April 27, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 1019  / 3 Years ago, sat, may 1, 2021, 11:22:39

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.


More From » permissions

 Answers
1

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


[#27173] Sunday, May 2, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
sipwing

Total Points: 245
Total Questions: 100
Total Answers: 118

Location: Aland Islands
Member since Thu, Oct 22, 2020
4 Years ago
;