Audit world-writable files in your home directory

List every file that any user on the system could modify.

LinuxpermissionssecurityauditfindLow risk
Run find /home -xdev -type f -perm -0002 -ls to list world-writable files; fix them with chmod o-w on each path.

01Command

Command
$ find /home -xdev -type f -perm -0002 -ls 2>/dev/null

02What it does

A world-writable file can be altered by any account on the machine, which turns a minor compromise into a full one — attackers love dropping into scripts and configs that others execute. -perm -0002 matches anything with the 'others write' bit, and -xdev keeps the search on one filesystem so it finishes fast. This mirrors the SUID audit but targets the opposite, and even more common, permission mistake.

03Risk

RiskLow risk
!Warning: Some programs legitimately use world-writable sockets or temp dirs — check before chmod; for directories also consider the sticky bit (+t) rather than removing group access blindly.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • find(1) — Linux manual page
    man7.org · community · 2026-09-17
    Evidence: The -perm -0002 test matches files that have the write bit for others set; -ls prints details of each match.

Last verified: 2026-09-18 · Category: Security & Privacy

06Related solutions