When setting up a shared projects folder for multi-user access to all the code we're developing on your VPS and where multiple users have their own accounts, we’ll want to choose a location that is accessible to all users but also secure. Here’s how we can achieve this on our Ubuntu 24.04 VPS:
A good place to store the shared code folder is within the /opt
directory, which is typically used for optional software packages and can be a good place for shared resources.
For example, we can create the directory /opt/projects
.
First, create the directory where the code will be stored: