am using the haproxy socat to get the sessions data to plot it in cacti, /var/run/socket-haproxy is owned by www-data (the user which cacti uses) but when I try to execute this command as www-data am getting permission denied, any help would be much appreciated.
sudo su - www-data echo show stat | socat unix-connect:/var/run/socket-haproxy stdio | grep inbound | cut -d, -f 5
2012/01/11 15:58:18 socat[5448] E connect(3, AF=1 "/var/run/socket-haproxy", 25): Permission denied
-su: Can't open echo