Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

This question already has an answer here:

I have received an interesting problem during I tried to set my Server time either with NTD or manually using date command.

First of all I have tried to use NTD. I have succesfully installed the latest version of NTD, started it. After that I have wanted the synchronization to start. This is why I have run the following command: ntpdate pool.ntp.org

And I have received the following error:

18 May 15:29:21 ntpdate[15477]: step-systime: Operation not permitted

Than I did not know what to do, so I have tried to set the time manually using the date command:

rm /etc/localtime
ln -s /usr/share/zoneinfo/GMT /etc/localtime
date 051822172013

However I got this error:

date: cannot set date: Operation not permitted

Can anyone guess what could be the possible problem on my server? I'm logged in as root and I'm using CentOS 5.

Thank you.

share|improve this question

marked as duplicate by Michael Hampton, Ward, mdpc, EEAA, Scott Pack May 20 '13 at 2:22

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers 2

You can't set the time yourself in a shared-kernel, container-based VPS such as OpenVZ or Virtuozzo.

If the system time is wrong, contact the hosting provider. If the system time remains wrong, switch to another provider and consider using something other than OpenVZ.

Problems with the system time is, in fact, one of the many reasons I don't use OpenVZ based VPSes for anything anymore.

share|improve this answer
    
Thank you for the detailed answer. My main problem is that I'm trying to use Amazon services and they require exact time. –  Quentin McLoad May 18 '13 at 18:38

Is this a dedicated physical server or a VPS?

If it's a VPS, you may not have permissions to do this. Otherwise, running the date/ntpdate/hwclock commands should work as a root user.

If you are using a VPS, contact your provider to handle this for you.

share|improve this answer
    
It is a VPS actually. Thank you for the answer. I'll contact the provider. –  Quentin McLoad May 18 '13 at 15:52

Not the answer you're looking for? Browse other questions tagged or ask your own question.