[Tutor] Running a python script as root.
alan.gauld at btinternet.com
Sun Jul 4 21:29:54 CEST 2010
"Srihari k" <srih4ri at gmail.com> wrote
> The script still works as before ..
> date: cannot set date: Operation not permitted
> Sun Jul 4 23:37:37 IST 2010
> I guess this because the python interpreter is still being run by
> normal user and is unprivileged to set the date ? Is it ?
I'd hope so! No matter what the script it should still be subject to
the restrictions of the user - otherwise guest users etc could
potentially create havoc.
Setting the time is a serious operation on a shared system
or server since it could cause some time based apps to miss
a vital run sequence, or upset build operations in a development
environment. You may only use your PC as a single user
environment but *nix doesn't know that!
sudo is there for a reason, learn to love it, as it protects you
Author of the Learn to Program web site
More information about the Tutor