CRON - chown and chgrp to a directory from root user to www-data
问题 I am trying to change group and owner (from root to www-data) for a directory. So I have set a cron on root which looks like this: 0,5 * * * * sudo /bin/chown -R www-data /var/www/pdf/ && sudo /bin/chgrp -R www-data /var/www/pdf/ But unfortunately it's not working. Can anyone please help me? 回答1: 0,5 * * * * sudo /bin/chown -R www-data /var/www/pdf/ && sudo /bin/chgrp -R www-data /var/www/pdf/ First off, the chgrp is redundant, you can manage the same with the chown command itself. So instead