Page tree

Versions Compared

Key

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

...

Then as a staff user, sudo,

Code Block
languagebash
 
sudo mv /home/serveradmin/0fs-tomcat/ /opt/tomcat.1/

To create your own modified 0fs package,

Code Block
languagebash
sudo tar -czvf 0fs-tomcat.tar.gz ./0fs-tomcat/

Tomcat and serveradmin

I will re-iterated that you should run Tomcat or any public facing service for that matter as serveradmin. As noted in account creation, this is for security reasons. In the event that Tomcat is somehow attacked, the compromise would be limited to serveradmin which has reduced limited priviledges.

...

Finally, if this is a multi-user machine, we secure tomcat from other users and processes. The only users should be serveradmin for read and write and staff for read to debug.

Note

I'll be writing an improved article that uses ACLs in the future that deals with permissions better.

Change the permissions,

Code Block
languagebash
cd /opt/apache
sudo chown -R serveradmin:staff ./tomcat.1/
sudo chmod -R o-wrx ./tomcat.1/

At this point, if you wanted to create your own modified 0fs package,

Code Block
languagebash
sudo tar -czvf 0fs-tomcat.tar.gz ./0fs-tomcat/

Change Default Ports

Normally it's fine to leave Tomcat on the default port. However, for this exercise we are going learn how to change ports on both instances.

We will change Tomcat1 from the default ports,

...