fix: adjust cron files and folder permissions
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
b85da540b2
commit
933c33553d
@ -1,13 +1,13 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
### Update system
|
||||
### Updates system
|
||||
echo '> Update packages ...'
|
||||
dnf -yq update
|
||||
dnf -q clean all
|
||||
|
||||
## Adjust Grub config
|
||||
echo '> Adjust Grub config ...'
|
||||
## Sets Grub config
|
||||
echo '> Set grub config ...'
|
||||
KERNEL_OPTIONS=(
|
||||
'audit=1'
|
||||
'audit_backlog_limit=8192'
|
||||
@ -32,6 +32,16 @@ grubby --update-kernel=ALL --args="audit=1"
|
||||
grubby --update-kernel=ALL --args="audit_backlog_limit=8192"
|
||||
chmod 600 /boot/grub2/grub.cfg
|
||||
|
||||
### Sets cron permissions
|
||||
echo '> Set cron permissions ...'
|
||||
chmod 0700 /etc/cron.d
|
||||
chmod 0700 /etc/cron.daily
|
||||
chmod 0700 /etc/cron.hourly
|
||||
chmod 0700 /etc/cron.monthly
|
||||
chmod 0700 /etc/cron.weekly
|
||||
chmod 0600 /etc/crontab
|
||||
rm -rf /etc/cron.deny
|
||||
|
||||
### Cleans all audit logs
|
||||
echo '> Cleaning all audit logs ...'
|
||||
if [ -f /var/log/audit/audit.log ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user