Skip to main content Logo (IEC resistor symbol)logo

Quis custodiet ipsos custodes?
Home | About | All pages | RSS Feed | Gopher

OpenVZ dnsmasq set capabilities failed fix

Published: 14-08-2013 | Author: Remy van Elst | Text only version of this article

Table of Contents

When running dnsmasq under OpenVZ I sometimes get an error when restarting: setcapabilities failed. This is because dnsmasq starts as root, then doesprivileged stuff and then drops to the configured run user. In OpenVZ thesepermissions are not passed to the VPS, sadly. These three commands fix theproblem.

If you like this article, consider sponsoring me by trying out a Digital OceanVPS. With this link you'll get $100 credit for 60 days). (referral link)

Replace 195 with your container ID in the steps below.

Stop the container:

vzctl stop 195

Give it extra permissions:

vzctl set 195 --capability setuid:on --savevzctl set 195 --capability net_admin:on --savevzctl set 195 --capability net_raw:on --save

Then start it again:

vzctl start 195
Tags: dhcp, dns, dnsmasq, kernel, openvz, snippets, virtualization