I have been running my script from a cron job every night for several years. I didn't know that at some point a "newperms" script was made.
edit: I looked at the "newperms" script and noticed some things I don't like. It sets other and group to the same permissions as user. If user is not set properly, then group and other do not get set properly. Mine clears other which makes it docker safe and for security reasons not world readable, writable, or executable.
edit: I did a chmod 111, 117, and 177 to some files and then ran "newperms". All three files were changed to 000 and all the other files on my system were set to world readable and writable. Also, it did not output what changed so I couldn't save the changes to a log file.
edit: I just found another problem. MariaDB was not processing "custom.cnf". The log contained the following:
Warning: World-writable config file '/etc/mysql/conf.d/custom.cnf' is ignored
"newperms" had set "/mnt/cache/appdata/mariadb/custom.cnf" to 666 so "custom.cnf" was not getting processed. So I ran my script and restarted MariaDB. MariaDb processed "custom.cnf" and ran without errors.
edit: Should I make a bug report for "newperms" or are these bugs already known?