Access denied trying to enable or unmask firewalld

solution

sudo systemctl unmask --now firewalld
sudo systemctl enable firewalld
sudo systemctl start firewalld

Here's what worked for me.

Check for hanging firewalld proceses, e.g:

root  16278  1  4 Jan 13 ?  00:00:00 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid

kill them and then:

# yum reinstall firewalld
# service unmask firewalld
# service enable firewalld
# service start firewalld

And of course, look in journalctl to see what happened earlier.


This is highly recommended that you have a firewall protecting your server:

This error comes when you are trying to start or enable service which is either not installed on your Linux system or you typed an incorrect service name. See list of Services by typing:

systemctl list-units --type=service

Install if not available:

yum install firewalld

You can enable firewalld by typing:

systemctl enable firewalld
sudo systemctl enable firewalld

You can start firewalld by typing:

systemctl start firewalld
sudo systemctl start firewalld

Have a look to check its status by typing:

systemctl status firewalld