I am seeing zsh compinit: insecure directories and files when I run compinit. Yes, I have seen this SO post and this U&L post, as well as all sorts of related posts. For all of those examples, the solution is to remove write permissions from group and world. However, in my case the offending directories are not writable by group nor world.
$ compaudit
There are insecure directories and files:
/path/to/modules/init/zsh-functions
/path/to/modules/init
/path/to/modules/init/zsh-functions/_module
$ ll /path/to/modules
...
drwxr-sr-x 4 theuser thegroup 4.0K Feb 6 2020 init/
...
$ ll /path/to/modules/init
...
drwxr-sr-x 2 theuser thegroup 4.0K Feb 6 2020 zsh-functions/
...
$ ll /path/to/modules/init/zsh-functions
...
-rw-r--r-- 1 theuser thegroup 12K Feb 6 2020 _module
...
The two directories do have the SGID bit set, but nowhere have I seen that its presence will cause this warning. Further, the final path is a file, which does not have the SGID bit set.
These paths are not owned by me, but they are in a group to which I belong.
If it matters, these directories are for environment modules.
Can I get some pointers on how I can solve this issue, hopefully without just disabling the insecure check?