Linuxserver/MariaDB volume file permissions and ownership?

All of the sudden I have the scary issue with database server not starting and getting recurrent errors when starting like:

211022 20:47:53 mysqld_safe Logging to syslog.
211022 20:47:53 mysqld_safe Starting mysqld daemon with databases from /config/databases

These errors are continuously and cyclically rising, but for my case, I suspect my data wouldn’t be corrupted but I messed by accident with all permissions and ownership of all mariadb disk volume files and directories. Do you think this problem could be related to permissions and ownership, and if so, provide how files and directories should look like?? If no relation between those ideas is seen, I think I’ll have to destroy the database and recreate my Linuxserver/nextcloud instance and start from scratch :frowning:

How my files and directories permissions look like can be found in this pastebin:

Thanks in advance and BR.

PS: In case pastebin is removed, an example:
pi@raspberrypi:/media/pi/RaspberryPI/mariadb/databases $ ls -larth
total 185M
drwxr–r-- 2 pi pi 4,0K mar 10 2021 mysql
drwxr–r-- 2 pi pi 4,0K mar 10 2021 performance_schema
-rwxrwxr-- 1 pi pi 0 mar 10 2021
drwxr–r-- 2 pi pi 12K jul 16 00:37 nextcloud_db
-rwxrwxr-- 1 pi pi 48M oct 6 00:50 ib_logfile1
-rwxrwxr-- 1 pi pi 48M oct 17 14:05 ib_logfile0
-rwxrwxr-- 1 pi pi 76M oct 17 14:05 ibdata1
drwxrwxrwx 5 pi pi 4,0K oct 22 20:44 …
drwxrwxr-- 5 pi pi 4,0K oct 22 20:55 .
-rwxrwxr-- 1 pi pi 52 oct 22 20:55 aria_log_control
-rwxrwxr-- 1 pi pi 13M oct 22 20:55 aria_log.00000001

Just to confirm the solution to this.
I had to create a /tmp directory and assign a volume to it, since it seems that it cannot write in /tmp by itself since some upgrade or whatever. So just creating a volume for /tmp was enough to get mariaDB stating and working again.