Ubuntu – How to enable the AppArmor profile for Firefox

apparmorfirefox

Recently there an article in about configuring FF with AppArmor.

When I ran the below command

cat /etc/apparmor.d/usr.bin.firefox | sudo apparmor_parser –a

I get the following error

Error: Could not read profile –a: No such file or directory.

How to get rid of this error?

Also, I don’t use the FF which comes with Ubuntu, but I download latest FF and start using it. What changes to the command are required?

Best Answer

Simply run this instead of using cat:

sudo apparmor_parser /etc/apparmor.d/usr.bin.firefox

-a or add is the default operation apparmor_parser performs.

Why? the command as you tried it will work if you are logged in as root or you recently used sudo; the sudo password entry is causing the problem you experienced. In general, for pipes use this syntax: sudo sh -c "command1 | command2"


Note: the /usr/bin/firefox AppArmor profile is disabled by default in Ubuntu. As long as the version of Firefox you download installs in /usr/bin (e.g. not your home directory), the default AppArmore profile can be enabled and will work.

Related Question