Permanent directory is ignored and data is in Tomcat work directory

I am also encountering this issue. Log shows

[main] ERROR o.x.e.i.ServletEnvironment     - Configured permanent directory [/var/lib/xwiki/data] is not writable.
[main] WARN  o.x.e.i.ServletEnvironment     - Falling back on [/var/cache/tomcat9/Catalina/localhost/xwiki] as the permanent directory.
[main] INFO  o.x.e.i.ServletEnvironment     - Using permanent directory [/var/cache/tomcat9/Catalina/localhost/xwiki]

I have verified the tomcat user has write access to the directory.

$ sudo -u tomcat touch tomcatfile
$ ls -la /var/lib/xwiki/data
total 8
drwxr-xr-x 2 tomcat tomcat 4096 Nov  6 15:47 .
drwxr-xr-x 4 root   root   4096 Nov  6 12:00 ..
-rw-r--r-- 1 tomcat tomcat    0 Nov  6 15:47 tomcatfile

Also tried chmod 777. No luck.

This is on Ubuntu 18.04LTS, so no SELinux.