OpenVZ - Operation not permitted on changing date


When you try to set date in a OpenVZ container, it may show Operation not permitted error.


The capability for setting time is not given for the container.
sys_time capability mustbe enabled for the container to set the date and time.


1. Login to OpenVZ Hardware Node as root user.

2. [root@HN ~] # vzlist -a | grep <IP of VPS>
                  <VPSID>         59  running   <IP>

3. [root@HN ~] # vzctl stop <VPSID>

4. [root@HN ~] # vzctl set <VPSID> --capability sys_time:on --save

5. [root@HN ~] # vzctl start <VPSID>

Now the capability parameter for changing time is given for the container.
Try again changing the date. This time it will permit you to change the date and time.