Check reference

File permissions

What it checks

Finds files and directories that every user on the server can write to (e.g. 777, 666).

Check ID: files.permissions

Files and directories in the scan targets that every user on the server can write to (permissions such as 777 or 666) are reported. The top directory of each target is checked too.

This check does not run on Windows servers.

What a finding means

The titles, severities and explanations below are the ones shown on the Findings screen.

FindingSeverityMeaning
World-writable file
permissions.world_writable_file
High MediumThe file permissions are …. Any user or process on the server can change it.
High: PHP files. Medium: other files.
World-writable directory
permissions.world_writable_dir
HighThe directory permissions are …. Any user or process on the server can add files here.

How to fix

The recommended action shown with each finding:

  • World-writable file
    Set files to 644 (or 640).
  • World-writable directory
    Set directories to 755 (or 750) and files to 644 (or 640).

Related settings

  • Settings → Targets: Themes to scan, Plugins to scan and Directories outside WordPress decide which files are checked. Each registered directory has its own Checks and exclusions.
  • Settings → Checks → Enabled checks: switch “File permissions” on or off.
  • Settings → Checks → Exclude patterns: files and folders that are not checked (by default node_modules, vendor, .git, .svn and cache).