...
The scenario is we want to provide website hosting for two different clients, The Daily Planet and LexCorp. Employees from the respective companies will kept in the system under the following groups, wgdailyplanet and wglexcorp.
User Name | Assigned User | Group | Web Root Directory | File Access | Directory Access |
---|---|---|---|---|---|
dailyplanet01 | Clark Kent | wgdailyplanet | /opt/web/php/dailyplanet/ | Read, Write and Execute | Read, Write and Execute |
lexcorp01 | Lex Luthor | wglexcorp | /opt/web/php/lexcorp/ | Read, Write and Execute | Read, Write and Execute |
Apache Server | www-data | /opt/web/php/dailyplanet/ /opt/web/php/lexcorp/ | Read | Read and Execute (required to transverse directories) | |
Staff Users | staff | /opt/web/php/dailyplanet/ | Read | Read and Execute (required to transverse directories) | |
Other | No Access | No Access |
...
Code Block | ||
---|---|---|
| ||
sudo --gid 3100 wgdailyplanet sudo --gid 3101 wglexcorp sudo useradd -d /opt/web/php/ckentdailyplanet01 -m -g wgdailyplanet -u 4001 -c "Clark Kent" -s /bin/bash ckentdailyplanet01 sudo useradd -d /opt/web/php/lluthorlexcorp01 -m -g wglexcorp -u 4006 -c "Lex Luthor" -s /bin/bash lluthorlexcorp01 |
Creating the Directory Structure and Permissions
...