Tomcat and Jenkins: The home directory "/opt/tomcat/.jenkins" can not be created.

I'm trying to install Jenkins, but I think there's a problem with setting up Tomcat.

Basically, I've worked through an online tutorial for installing Tomcat on Ubuntu 16.04:

sudo groupadd tomcat
sudo useradd -s /bin/false -g tomcat -d /opt/tomcat tomcat

It was also instructed to set the ownership and permissions of the Tomcat home directory, which I did:

sudo chgrp -R tomcat /opt/tomcat
sudo chmod -R g+r conf
sudo chmod g+x conf
sudo chown -R tomcat webapps/ work/ temp/ logs/

So I can see that the directory / opt / tomcat is set up so that Tomcat can write:

$ ls -la /opt/tomcat
total 156
drwxr-xr-x 9 root   tomcat  4096 Oct  9 17:41 .
drwxr-xr-x 5 root   root    4096 Oct  9 17:41 ..
drwxr-x--- 2 root   tomcat  4096 Oct  9 17:41 bin
-rw-r----- 1 root   tomcat 19318 Sep 16 19:19 BUILDING.txt
drwxr-x--- 2 root   tomcat  4096 Oct  9 18:10 conf

However, when I try to view the Jenkins that are now installed in the browser, permissions issues are reported:

Unable to create the home directory ‘/opt/tomcat/.jenkins’. This is most likely a permission problem.

To change the home directory, use JENKINS_HOME environment variable or set the JENKINS_HOME system property. See Container-specific documentation for more details of how to do this.

Is there something obvious that I missed? If I need to post something, I can update it here. Should I set Tomcat as owner and group? Since it's a production server, you do not want to grant more permissions than required, and this was not stated in the tutorials I've seen.