Access denied trying to enable or unmask firewalld
68,063
Solution 1
solution
sudo systemctl unmask --now firewalld
sudo systemctl enable firewalld
sudo systemctl start firewalld
Solution 2
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.
Solution 3
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
Related videos on Youtube
Author by
MahuLovzYou
Updated on September 18, 2022Comments
-
MahuLovzYou almost 2 years
My firewall is currently inactive.
systemctl status firewalld firewalld.service Loaded: masked (/dev/null) Active: inactive (dead)
I used the following command to enable the firewall
# systemctl unmask firewalld
but I got this error:
# systemctl unmask firewalld Failed to issue method call: Access denied # sudo systemctl restart firewalld Failed to issue method call: Unit firewalld.service failed to load: No such file or directory. # sudo systemctl enable firewalld Failed to issue method call: Access denied
-
Liczyrzepa about 8 yearsIs firewalld disabled in favor of iptables.service? Does
lsmod | grep iptab
show loaded modules? -
sjlxndr about 8 yearsThis might be a duplicate question - have a look here: http://serverfault.com/questions/470287/how-to-enable-iptables-instead-of-firewalld-services-on-rhel-7-and-fedora-18 from that post: "This legacy package provides the systemd scripts for the previous iptables invocation." - in other words, even if firewalld is installed, the systemd config for it might not be.
-
-
Pierre.Vriens about 8 yearsWhat does that link include?
-
Peter about 8 yearsThe exact instructions on how to install and and enable iptables for RHEL 7/centos 7 .
-
Michael Hampton almost 4 yearsThis is correct. The OP does not have firewalld installed, and needs to install it.