Zimbra weirdness when you zmcontrol start/stop from the wrong directory

Aug 21 15:48:01 mail zmconfigd[50891]: Exception in bin/zmmtactl: (Cannot run program "/opt/zimbra/bin/zmmtactl" (in directory "/root"): error=13, Permission denied)
Aug 21 15:48:01 mail zmconfigd[50891]: Exception in bin/zmopendkimctl: (Cannot run program "/opt/zimbra/bin/zmopendkimctl" (in directory "/root"): error=13, Permission denied)
Aug 21 15:48:01 mail zmconfigd[50891]: Exception in bin/zmsaslauthdctl: (Cannot run program "/opt/zimbra/bin/zmsaslauthdctl" (in directory "/root"): error=13, Permission denied)
Aug 21 15:48:01 mail zmconfigd[50891]: Exception in bin/zmswatchctl: (Cannot run program "/opt/zimbra/bin/zmswatchctl" (in directory "/root"): error=13, Permission denied)
Aug 21 15:48:01 mail zmconfigd[50891]: Exception in bin/zmspellctl: (Cannot run program "/opt/zimbra/bin/zmspellctl" (in directory "/root"): error=13, Permission denied)
Aug 21 15:48:01 mail zmconfigd[50891]: Exception in bin/zmstatctl: (Cannot run program "/opt/zimbra/bin/zmstatctl" (in directory "/root"): error=13, Permission denied)
Aug 21 15:48:01 mail zmconfigd[50891]: Exception in bin/zmclamdctl: (Cannot run program "/opt/zimbra/bin/zmclamdctl" (in directory "/root"): error=13, Permission denied)

Seeing similar entries in your /var/log/zimbra.log? This happens when you do a zmcontrol start/stop/restart from a directory other than /opt/zimbra.

Anyway here’s what you do to “fix” it:

*While initially logged in as root:

su -l zimbra
zmcontrol stop
exit
/opt/zimbra/libexec/zmfixperms --verbose --extended

It may not be necessary to fix permissions with zmfixperms but do it just in case. Next, do the following:

su -l zimbra
pwd #Verify that your cwd is /opt/zimbra ...
cd /opt/zimbra #... cd into /opt/zimbra if it isn't, then:
zmcontrol start

In order to prevent this problem from reappearing, you must run zmcontrol start from within /opt/zimbra.