Skip to main content

Raymii.org Raymii.org Logo

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

OpenVZ dnsmasq set capabilities failed fix

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


❗ This post is over eleven years old. It may no longer be up to date. Opinions may have changed.

When running dnsmasq under OpenVZ I sometimes get an error when restarting: set capabilities failed. This is because dnsmasq starts as root, then does privileged stuff and then drops to the configured run user. In OpenVZ these permissions are not passed to the VPS, sadly. These three commands fix the problem.

Recently I removed all Google Ads from this site due to their invasive tracking, as well as Google Analytics. Please, if you found this content useful, consider a small donation using any of the options below:

I'm developing an open source monitoring app called Leaf Node Monitoring, for windows, linux & android. Go check it out!

Consider sponsoring me on Github. It means the world to me if you show your appreciation and you'll help pay the server costs.

You can also sponsor me by getting a Digital Ocean VPS. With this referral link you'll get $200 credit for 60 days. Spend $25 after your credit expires and I'll get $25!

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 --save
vzctl set 195 --capability net_admin:on --save
vzctl set 195 --capability net_raw:on --save

Then start it again:

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