Initial commit.
This commit is contained in:
commit
3d665e5e11
72 changed files with 3200 additions and 0 deletions
24
base-files/cron.hourly/log-acls
Executable file
24
base-files/cron.hourly/log-acls
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Sleep for a couple of minutes to prevent a race condition with other cron jobs.
|
||||
sleep 120
|
||||
|
||||
# Secure /var/log
|
||||
# Set standard access perms for directories
|
||||
setfacl -m user::rwx,group::rx,other::x /var/log/
|
||||
find /var/log/*/ -type d -exec setfacl -m user::rwx,group::rx,other::- {} \;
|
||||
# Set standard access perms for files
|
||||
find /var/log -type f -exec setfacl -Rm user::rw,group::r,other::- {} \;
|
||||
# Allow group 'admin' read access to all directories/files
|
||||
find /var/log -type d -exec setfacl -m group:admin:rX {} \;
|
||||
find /var/log -type f -exec setfacl -m group:admin:r {} \;
|
||||
# Set default access for new files in directories.
|
||||
find /var/log -type d -exec setfacl -dm user::rwX,group::rX,other::- {} \;
|
||||
find /var/log -type d -exec setfacl -dm group:admin:rX {} \;
|
||||
# /var/log/wtmp needs to be readable by everyone
|
||||
setfacl -m user::rw,group::r,other::r /var/log/wtmp
|
||||
|
||||
# To clear above ACL settings:
|
||||
# setfacl -Rk /path
|
||||
# setfacl -Rx group:admin: /path
|
||||
# setfacl -Rx mask:: /path
|
||||
Loading…
Add table
Add a link
Reference in a new issue