How add User/Group to Stop/Start HTTPD


#1

Hi

I have one server running httpd(apache), i need do permission to my User/Group to Stop/Start HTTPD.
Ex.
User - myuser
group - files

I go to visudo and add one line with this params in group:

%files ALL= NOPASSWD: /usr/bin/systemctl restart httpd.service

But this not works, any ideia to help me, i need that user start/stop apache only.


#2

Hi

It should be

%files ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart httpd.service