This note will cover the essential commands to manage machines with multiple users that need to work on the same project owo
Create a User
sudo useradd -m usernameCreate a group for the project which the user will work on
sudo groupadd groupnameAdd the user to the group
sudo usermod -aG groupname usernameoptional: set the user’s password
sudo passwd usernamemake your project directory in /var/www/html or /opt
sudo mkdir /var/www/html/projectnameChange the group of the project directory to the group you created
sudo chown -R :groupname /var/www/html/projectname
# or use chgrp
sudo chgrp -R groupname /var/www/html/projectname
# -R is for recursively applying the changes to all files and directories inside the project directory
sudo chmod -R 775 /var/www/html/projectnameDepending on your situation you might need to give read write access to the owner or group. You can do it by chmod g+rw here g means group, rw means read and write. Similarly x means execution.
chmod rw -R /project/path # For the owner
chmod g+rw -R /project/path # For the group