php - shell_exec chmod on crontab doesn't work? -


i have line in crontab , php script below:

/etc/crontab: -

*/1 * * * * root /usr/bin/php /var/www/html/xxx.php 

php: -

<?php  shell_exec("sudo chmod 655 /files/to/path/xxx.wac");  ?> 

when run manually

sudo /usr/bin/php /var/www/html/xxx.php

it works should be. when crontab reach 1 minute lapse, doesn't execute command in php should.
note: checked on syslog run command after every minutes.


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -