Whenever I set up Ubuntu on a new system, I active the default AppArmor profile for Firefox via

sudo aa-enforce /etc/apparmor.d/usr.bin.firefox

Doing this on Ubuntu 14.04, however, makes Java applets unusable. Running Firefox by terminal and navigating to Oracle's Java Test page will lead to error messages like:

Failed to create data directory /run/user/1000/icedteaplugin-$USER-XXXXXX, Permission denied
Unable create data directory (null)

I have tried both IcedTea 6 and IceaTea 7 plugins, but without success. Setting Firefox' profile to complain mode via sudo aa-complain ... and restarting AppArmor by sudo service apparmor reload still doesn't allow Java applets to run. The only method to get them to work that I've found so far is to disable AppArmor for Firefox altogether via:

sudo ln -s /etc/apparmor.d/usr.bin.firefox /etc/apparmor.d/disable/
sudo apparmor_parser -R /etc/apparmor.d/usr.bin.firefox
sudo service apparmor reload

Obviously, this is rather inconvenient and undesirable from a security standpoint.

Is there a way to keep AppArmor for Firefox activated and allow running Java applets via IcedTea?

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.