Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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 NameAssigned UserGroupWeb Root DirectoryFile AccessDirectory Access
dailyplanet01Clark Kentwgdailyplanet/opt/web/php/dailyplanet/Read, Write and ExecuteRead, Write and Execute
lexcorp01Lex Luthorwglexcorp/opt/web/php/lexcorp/Read, Write and ExecuteRead, Write and Execute
 Apache Serverwww-data/opt/web/php/dailyplanet/
/opt/web/php/lexcorp/
ReadRead and Execute (required to transverse directories)
 Staff Usersstaff

/opt/web/php/dailyplanet/
/opt/web/php/lexcorp/

ReadRead and Execute (required to transverse directories)
 Other  No AccessNo Access

...

Code Block
languagebash
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

...