How do you find world-writable files and other risky permissions?
BeginnerProductionFirewalls, MAC & Compliance
Answer
sudo find / -xdev -type f -perm -0002 -ls 2>/dev/null # world-writable files
sudo find / -xdev -type d -perm -0002 ! -perm -1000 -ls 2>/dev/null # world-writable dirs without sticky bit
sudo find / -xdev \( -perm -4000 -o -perm -2000 \) -type f 2>/dev/null # SUID/SGID
Run these in scheduled compliance scans and compare against a known-good baseline.
More on Firewalls, MAC & Compliance
How do ufw, firewalld, nftables and iptables relate?BeginnerConfigure ufw for a web server with SSH only from the office.BeginnerExplain firewalld zones and runtime vs permanent configuration.IntermediateWrite a minimal nftables ruleset for a server.AdvancedWhy are nftables preferred over iptables at scale?AdvancedHow do you avoid locking yourself out when changing remote firewall rules?Intermediate