...
Code Block |
---|
|
cd /home
sudo mkdir www.krypton.com # Home directory for the website.
sudo mkdir www.earth.com
cd /home/www.krypton.com
sudo mkdir www # Folder for static content
cd /home/www.earth.com
sudo mkdir www # Folder for static content
sudo addgroup \--gid 3100 wgkryptonian # Special work group to distinguish users who should have access to the website.
sudo addgroup \--gid 3101 wgearthling
cd /home
sudo chown \-R serveradmin:wgkryptonian ./www.krypton.com/
sudo chown \-R serveradmin:wgearthling ./www.earth.com/
sudo chmod \-R 775 www.krypton.com # Only svradm and users in the kryptonian group can manage. Apache(other's) still need to be able to read and browse.
sudo chmod \-R 775 www.earth.com |
Now we create users that will have access to their respective websites,
Code Block |
---|
|
sudo useradd \-d /home/kalel \-m \-u 2500 \-G wgkryptonian \-c "Client" \-s /bin/bash kalel # Add user kalel with additional group and make the user's home directory
sudo useradd \-d /home/jorel \-m \-u 2501 \-G wgkryptonian \-c "Client" \-s /bin/bash jorel
sudo passwd kalel
sudo passwd jorel
sudo useradd \-d /home/loislane \-u 2502 \-m \-G wgearthling \-c "Client" \-s /bin/bash loislane
sudo useradd \-d /home/jimmyolsen \-u 2503 \-m \-G wgearthling \-c "Client" \-s /bin/bash jimmyolsen
sudo passwd loislane
sudo passwd jimmyolsen |
...