The real-time clock /dev/rtc can be read using hwclock -r but only as root.
>hwclock -r --debug hwclock from util-linux 2.23.2 hwclock: cannot open /dev/rtc: Permission denied No usable clock interface found. hwclock: Cannot access the Hardware Clock via any known method. >sudo hwclock -r [sudo] password for xxx: Wed 26 Apr 2017 12:44:01 BST -0.281946 seconds
I can't think of any good reason to prevent any user from reading a clock. So why is root acess required here?
My only thought is that it must be something to do with a low-level query that could somehow interface with the system. Perhaps if you continually read /dev/rtc you could block it long enough to upset the kernel?
Context: I am now responsible for an application which reads from /dev/rtc. Because of this it must run as root but there is no real reason it couldn't be a userspace application. I question its need to use the real-time clock at all but my question still stands.