Comment 4 for bug 812870

Revision history for this message
offby1 (offby1) wrote :

As far as I can tell, "sg" only sets the "effective group ID", of which your process has exactly one; but it doesn't add to the "supplementary group IDs". In my case, I wanted my process to have both, and "sg" wasn't helping. So I found this workaround: instead of having ``setuid logstash`` followed by ``exec java -jar logstash-1.3.3-flatjar.jar agent -f /etc/shipper.conf``, I got rid of the ``setuid`` and used ``exec sudo -u logstash bash -c "java -jar logstash-1.3.3-flatjar.jar agent -f /etc/shipper.conf"``. Turns out that "sudo" sets all the supplementary GIDs for me.