↑ ↓ select, Enter open, Esc close

Find world-writable files and directories

Adjust the values, the command updates live
user@server
find /var/www/vhosts -xdev -perm -0002 ! -type l -ls 2>/dev/null

Lists all files and directories below the path that every user can write to. Symbolic links are skipped because they always show 777. In web directories, matches point to an earlier chmod -R 777 through which other users or compromised scripts can modify files.

Note: Under /tmp and /var/tmp, such permissions are normal when combined with the sticky bit.

Also searched as

  • find world writable files
  • find files with 777 permissions
  • check chmod 777 web directory

Related one-liners

All in Security

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.