Commit 33ec0c02 authored by Kristian Klausen's avatar Kristian Klausen 🎉
Browse files

Fix swapfile "insecure permissions"

This isn't really necessary as /swap is mode 0700, but a warning is
logged in the journal[1], so let's set /swap/swapfile to mode 0600 and
get rid of the warning.

[1] swapon[189]: swapon: /swap/swapfile: insecure permissions 0644, 0600 suggested.
parent 2a28972c
......@@ -11,6 +11,7 @@ function pre() {
chattr +C "${MOUNT}/swap"
chmod 0700 "${MOUNT}/swap"
fallocate -l 512M "${MOUNT}/swap/swapfile"
chmod 0600 "${MOUNT}/swap/swapfile"
mkswap "${MOUNT}/swap/swapfile"
echo -e "/swap/swapfile none swap defaults 0 0" >>"${MOUNT}/etc/fstab"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment