I've been trying for hours to get a munin monitoring plugin to hook into the Tor control port without success. The problem is that it's unable to access the Tor authcookie in /var/run/tor with the error permission denied. I've tried everything: Running the script as root, adding both root and www-data (it's a php script) into the debain-tor usergroup, changing permissions on /var/run/tor and /var/run/tor/control.authcokie (which works, but then prevents Tor from starting up throwing an error saying that the permissions aren't tight enough >.>), even changing the location of where Tor saves the cookie file all without success.
I've set the setting CookieAuthFileGroupReadable 1 in torrc and restarted Tor and the monitoring tool more times than I can count, all without luck. Is there some way to allow programs to access the cookie file while still maintaining strict enough permissions to allow Tor to start and run successfully?