I've developed an application that uses NTP to change the network time, to sync two of my computers.
It runs as root
, since only the latter is allowed to change the time and date on Linux(I guess).
Now, I want to run it as a user. But, I need to access the time.
- Is it a good practice to run a daemon under a non-root user account?
- Shall I give my application a capability such as
CAP_SYS_TIME
? - Does it not introduce a security vulnerability?
- Is there a better way?
ntp
user account (at least on Linux systems) so you shouldn't be required to make this change. What NTP package have you installed?