I am dynamically creating files with laravel, I need to give them specific permissions by using chmod and change the user and group with chown.
I tried to enter the following lines to my /etc/sudoers by using visudo.
NOTE: Always use visudo otherwise you might corrupt the file.
www-data ALL=(ALL) NOPASSWD: chmod
www-data ALL=(ALL) NOPASSWD: chown
But I get syntax errors on these lines.