#!/bin/bash #################################################################################################### #### author: SlickStack ############################################################################ #### link: https://slickstack.io ################################################################### #### mirror: http://mirrors.slickstack.io/bash/ss-perms-ufw-core.txt #################################### #### path: /var/www/ss-perms-ufw-core ################################################################### #### destination: n/a (not a boilerplate) ########################################################## #### purpose: Resets all file and user permissions across the entire UFW module #################### #### module version: UFW 0.36 ###################################################################### #### sourced by: ss-perms, ss-install-ufw ########################################################## #### bash aliases: ss perms ufw #################################################################### #################################################################################################### ## include SlickStack configuration ## source /var/www/ss-config ## include SlickStack functions ## source /var/www/ss-functions #################################################################################################### #### SS-Perms-UFW: Message (Begin Script) ########################################################## #################################################################################################### ## this is a simple message that announces to the shell the purpose of this bash script ## ## it will only be noticed by sudo users who manually call ss core bash scripts ## ## echo message ## echo -e "${PURPLE}Running ss-perms-ufw: Resets all file and user permissions across the entire UFW module... ${NOCOLOR}" sleep "$SLEEP_MESSAGE_BEGIN" #################################################################################################### #### SS-Install-UFW: Reset Permissions + Restart UFW Firewall ###################################### #################################################################################################### chown root:root /etc/default/ufw chown root:root /etc/ufw/ufw.conf chown root:root /etc/ufw/user.rules chown root:root /etc/ufw/user6.rules chmod 0664 /etc/default/ufw chmod 0664 /etc/ufw/ufw.conf chmod 0664 /etc/ufw/user.rules chmod 0664 /etc/ufw/user6.rules #################################################################################################### #### SS-Perms-UFW: Touch Timestamp File (End Script) ############################################### #################################################################################################### ## this is a dummy timestamp file that will remember the last time this script was run ## ## it can be useful for developer reference and is sometimes used by SlickStack ## ## script timestamp ## touch /var/www/meta/.timestamp-ss-perms-ufw-core #################################################################################################### #### SlickStack: External References Used To Improve This Script (Thanks, Interwebz) ############### #################################################################################################### ## Ref: ## SS_EOF