0
I have a script that require to change the owner recursively in a folder
there is my specific sudoers file: /etc/sudoers.d/jenkins
jenkins ALL=(ALL) NOPASSWD: /bin/chmod, /bin/chown
and this is the command that jenkins need to execute:
chown -R apache:apache /var/www/vhosts/${HOST}/${PROJECT}
for security reasons, i need to restrict the sudo permissions only for chown with argument /var/www/vhosts/***
there are some regex in sudoers file to do this?