...
Code Block | ||
---|---|---|
| ||
cd /opt/web sudo mkdir www.krypton.com # Home directory for the website. cd /opt/web/www.krypton.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. cd /opt/web sudo chown -R serveradmin:wgkryptonian ./www.krypton.com/ sudo chmod -R o-wxw ./www.krypton.com/ # Make sure others can't change files. # Ensure setgid bit is setup so new files created will have same groups. sudo find ./www.krypton.com/ -type d | sudo xargs -I{} chmod g+s {} # Repeat for www.earth.com cd /opt/web sudo mkdir -p www.earth.com/www # Makes both directories with one command sudo addgroup --gid 3101 wgearthling sudo chown -R serveradmin:wgearthling ./www.earth.com/ sudo chmod -R o-w ./www.earth.com/ # Make sure others can't change files. sudo find ./www.earth.com/ -type d | sudo xargs -I{} chmod g+s {} |
...