2

I try to use the hwclock but I get this output:

[arkadi@arkadi-linux /home/arkadi $]hwclock 
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --debug option to see the details of our search for an access method. 

When I use debug I got this message:

[arkadi@arkadi-linux /home/arkadi $]hwclock --debug 
hwclock from util-linux 2.26.2
hwclock: cannot open /dev/rtc: Permission denied
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.

I using :

Linux arkadi-linux 4.0.7-2-ARCH #1 SMP PREEMPT Tue Jun 30 07:50:21 UTC 2015 x86_64 GNU/Linux

The permissions of /dev/rtc0 are:

crw-rw---- 1 root audio 254, 0 Jul  5  2015 /dev/rtc0

my group memberships are:

uid=1000(arkadi) gid=100(users) groups=100(users),10(wheel),95(storage),98(power)

how to fix it?

With sudo it works:

[arkadi@arkadi-linux / $]sudo hwclock
Sun 05 Jul 2015 11:35:31 AM IDT .339125 seconds

But it worked some time without sudo also.

  • 1
    Try sudo hwclock ... – muru Jul 5 '15 at 8:30
  • with sudo it works: [arkadi@arkadi-linux / $]sudo hwclock Sun 05 Jul 2015 11:35:31 AM IDT .339125 seconds But it worked some time without sudo also – Arie Jul 5 '15 at 8:35
  • If you say so. Edit your question to add more information. What are the permissions of /dev/rtc0 (ls -l /dev/rtc0)? What are you group memberships (id)? – muru Jul 5 '15 at 8:44
  • 1
    Those are unusual permissions for /dev/rtc0, especially the audio group, which seems completely irrelevant. On my system the permissions are 0600 and group root. The insecure permissions you have for it on your system are a security concern, but they might explain how come you were able to access it in the past without being root. – Celada Jul 5 '15 at 8:56
  • 2
    @Celada seems to be an Arch thing. Both my current Arch boxes have it, and I don't play around with /dev. – muru Jul 5 '15 at 9:00
2

If it's standard for /dev/rtc0 to belong to the audio group in Arch, you could just add yourself to the audio group (using adduser; you'll need to log out and log back in for the change to be effective). Alternatively, you could add an ACL giving yourself access to the device (look up setfacl to see how to do this).

Ideally you shouldn't need to access the RTC as yourself though...

-1

You need to be root to run hwclock. Use:

su

to become root then type:

hwclock

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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