In Ubuntu Server, apport is the core service responsible for intercepting crashes, generating crash reports, and submitting them to Canonical’s error tracking infrastructure. While apport itself handles the initial interception, the apport-autoreport.service is specifically designed to automatically upload these generated crash reports in the background without requiring user intervention. In secure enterprise environments, air-gapped systems, or servers containing highly sensitive data in memory, automatically transmitting core dumps over the internet is a severe security and compliance risk.
This guide provides a straightforward method to completely disable and mask the apport-autoreport.service in Ubuntu Server, preventing any background crash data transmission.
How to Disable the ‘apport-autoreport.service’
To safely disable the background reporting service, you must interact with systemctl. Follow these steps carefully with root or sudo privileges:
- Connect to your Ubuntu Server via SSH or open a terminal window.
- First, stop the service if it is currently running or pending by executing the following command:
sudo systemctl stop apport-autoreport.service - Next, disable the service to prevent it from starting automatically on the next system boot:
sudo systemctl disable apport-autoreport.service - To completely lock down the service and ensure that no other crash-handling scripts or timers can trigger an auto-report, you must mask it:
sudo systemctl mask apport-autoreport.service
Masking links the service file to /dev/null, effectively making it impossible for systemd to execute it.
Disabling Apport Entirely (Optional)
If you wish to go a step further and disable the local generation of crash dumps entirely, you should disable the main apport service:
sudo systemctl disable apport.service
sudo systemctl mask apport.service
Additionally, you can edit /etc/default/apport and set enabled=0. This ensures your server never attempts to capture or report software crashes, maximizing security.