On Wed, 12 Oct 2011, Ken Lu wrote:
> It seems my TS-7400(system shows 7200) does not have it.
> Basically I understand the reason, is by default, the Apache configed a
> user nobody as web client(when access from web page) does not have a
> root privilege to set time. Unless we can chang that.
This is basic web stuff under Linux. There are several options, among which
is the sudo command, and edit the configuration file /etc/sudoers to allow
"nobody" to execute the date command as root.
An alternative is to write a short program to do what you want as root and
set the "s" bit on the, root owned, executable. For more info google for
linux setuid. Though this method is a bigger security problem :-(
>
>
>
> --- On Wed, 10/12/11, Walter Marvin <> wrote:
>
>
> From: Walter Marvin <>
> Subject: Re: [ts-7000] how to set server's time from web client?
> To: "" <>
> Received: Wednesday, October 12, 2011, 9:43 AM
>
>
>
>
>
>
>
>
>
> on the 7500 its ts7500ctl
>
>
>
>
>
> From: Ken Lu <>
> To:
> Sent: Wednesday, October 12, 2011 9:30 AM
> Subject: Re: [ts-7000] how to set server's time from web client?
>
>
>
>
>
>
>
>
> Thanks, what commend for TS client?
> I found a clue, with "whoami" command, return "nobody". That is the reason.
>
> --- On Wed, 10/12/11, Walter Marvin <> wrote:
>
>
> From: Walter Marvin <>
> Subject: Re: [ts-7000] how to set server's time from web client?
> To: "" <>
> Received: Wednesday, October 12, 2011, 12:27 AM
>
>
>
>
>
>
> don't use date to set the time use the TS client
>
>
>
>
>
> From: Ken Lu <>
> To:
> Sent: Tuesday, October 11, 2011 5:54 PM
> Subject: Re: [ts-7000] how to set server's time from web client?
>
>
>
>
>
>
>
>
> No luck. I tested any command works, like touch, rm, cat, ps... but not
> date setting, even add -s. I can also use script to run other script file,
> works too. Since I can run those command, I think is not root privilege
> problem. I also tested using sh or ash to run, same result. Don't under
> stand the "date" command has something special.
>
>
>
>
> --- On Tue, 10/11/11, Walter Marvin <> wrote:
>
>
> From: Walter Marvin <>
> Subject: Re: [ts-7000] how to set server's time from web client?
> To: "" <>
> Received: Tuesday, October 11, 2011, 3:51 PM
>
>
>
>
>
>
> get the script to run at the Linux prompt first. If necessary use the set
> root method to give the script root privelage
>
>
>
>
>
>
> From: Ken Lu <>
> To:
> Sent: Tuesday, October 11, 2011 2:57 PM
> Subject: Re: [ts-7000] how to set server's time from web client?
>
>
>
>
>
>
>
>
>
> Yes I have. But we need accurate to second. Now my cgi file includes this:
> echo "$(date 090909092011%n)"
> After running, I can see this:
> Fri Sep 9 09:09:00 UTC 2011
> from browser. Same action as we type "date 090909092011" at Linux $ prompt.
> But the Linux time did not change. I don't know why. Just suspect the time
> changed needs root?
>
> --- On Tue, 10/11/11, harry olar <> wrote:
>
>
> From: harry olar <>
> Subject: Re: [ts-7000] how to set server's time from web client?
> To: "" <>
> Received: Tuesday, October 11, 2011, 2:26 PM
>
>
>
>
>
>
>
> See the threads about changing time.
>
> The RTC modules are optional on some boards. Do you have the module?
>
>
>
>
>
>
>
>
>
>
>
>
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|