Cron script uses up all space in /run
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
aide (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
The /etc/cron.
When doing this, it preserves all the data from the previous run and adds approximately the same amount of data from the current run. Eventually, all this data will fill up the /run filesystem.
This bug will affect anyone that has run the CIS hardening scripts on their systems. We would like this to be fixed so that this is not the default behavior.
root@my-
Filesystem Size Used Avail Use% Mounted on
tmpfs 796M 796M 0 100% /run
root@my-
794M aide
1.3M udev
796M total
root@my-
99M aide/cron.daily
100M aide/cron.
100M aide/cron.
99M aide/cron.
100M aide/cron.
100M aide/cron.
794M total
# Steps to reproduce
1. $ multipass launch bionic --name b1
2. $ multipass exec b1 bash
3. $ sudo apt update
4. $ sudo apt install aide
5. At the MTA configuration select "No configuration"
6. $ sudo run-parts /etc/cron.daily
7. $ sudo run-parts /etc/cron.daily
8. $ sudo ls /run/aide
At this point, the /run/aide directory will have a cron.daily and cron.daily.old* folder
It appears that the aide crontab will fail if an MTA is not configured or is not even running. Instead of selecting "No configuration" stopping the postfix process will cause the same failure.
# Possible workarounds/fixes
1. Remove `set -e` from /etc/cron. daily/aide or add `set +e` around the postfix section to ensure the cronjob completes even if the MTA is down
2. If this is due to a unconfigured MTA, then ensure that it is configured For example, set the MTA to a local configuration:
$ sudo debconf- set-selections <<< "postfix postfix/ main_mailer_ type select 'Local only'"
$ sudo dpkg-reconfigure -f noninteractive postfix