0

I am using nanopi board/ Ubuntu TLS 20.04 focal

have a simpoole site using nginx web server

inside a the page there is a button to apply new time to the system using "exec(date --set='')"

I have tried all possible configuration to setup using sudo and even add www-data ALL:nonpassword to visudo

then grant folder /var/www/html access www-data:www-data and permission 777

but I cannot modfiy the system time or restart it using my website

even I can do thesse operations using command promot.

please help.!

3
  • date --set requires superuser privileges, so you have to use sudo. Probably you used wrong syntax either in your exec command on the webpage or in the sudoers file. Have you checked your webserver logs? Error messages should be there...
    – raj
    Commented Oct 29 at 21:50
  • I have used sudo without result Commented Nov 11 at 9:08
  • Look in the logs, as I have written. If anything goes wrong, that's the first place to check. Nobody can help you without detailed information, and that information is in the logs.
    – raj
    Commented Nov 11 at 10:46

0

You must log in to answer this question.

Browse other questions tagged .