Find the answer to your Linux question:
Results 1 to 3 of 3
hi, i am developing c program that can set time and date base on my own input. i have chmod 777 /dev/RTC in order to open RTC so that it ...
  1. #1
    zam
    zam is offline
    Just Joined!
    Join Date
    Feb 2009
    Posts
    3

    C Programming-set time

    hi,
    i am developing c program that can set time and date base on my own input.
    i have chmod 777 /dev/RTC in order to open RTC so that it can be used.
    But when i try to set time by using "ioctl(fd,RTC_SET_TIME,&rtc_tm)" , i got error state that
    permission denied.

  2. #2
    Linux Guru
    Join Date
    Jan 2009
    Location
    Dover, NH
    Posts
    1,633
    Setting the time is a system function, requires root permissions. You might want to develop this one in a VM so you can't damage your system testing as root.

  3. #3
    zam
    zam is offline
    Just Joined!
    Join Date
    Feb 2009
    Posts
    3
    RTC_SET_TIME-how to make sure that permission is granted?
    ....I developing a driver for a device on real linux(ubuntu)....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...