This is a temporary fix for a problem running Gitlab on Proxmox 4.1 inside a LXC container. Symptom: UNIX sockets created inside containers get wrong permissions. This seems to be related to AppArmor and the Debian kernel used by Proxmox. See this thread on the Proxmox forum for details.
apt-get install inotify-tools if you haven't installed inotifywait yet.
Place the first file in
/usr/local/sbin/fix_gitlab.sh and make it executable:
chmod 755 /usr/local/sbin/fix_gitlab.sh. Edit
etc/rc.local to include it during boot.