Home / Security / Review file permissions on your server — nothing should be world-writable
Defensive & Operational · Security Ring

Review file permissions on your server — nothing should be world-writable

30-60 min Impact: medium Effort: low ✓ Manual completion

File permissions on your server control who and what can read, write, or execute each file, and a world-writable file, one anyone or anything can modify, is a serious, direct vulnerability that gives an attacker an easy path to alter your site's code.

A single world-writable file is sometimes all an attacker genuinely needs to inject malicious code directly, this is foundational server hygiene that is easy to check and fix once, but is genuinely serious if overlooked.

The full picture

Server file permission review addresses a genuine, foundational security principle — files and directories should carry only the minimum access permissions actually required for legitimate functionality, and overly permissive settings, particularly world-writable permissions, create unnecessary risk that any compromise elsewhere in your system could be leveraged to modify files it shouldn't have access to.

World-writable permissions specifically represent a particularly severe configuration risk — this setting allows any user or process on the system, including potentially compromised or malicious ones, to modify the affected files, meaning a vulnerability in an entirely unrelated part of your system could potentially be leveraged to modify these overly permissive files as part of a broader attack.

This review requires genuinely, systematically checking your actual server's file and directory permissions against the principle of least privilege — each file and directory should carry only the specific access level actually required for its legitimate function, rather than defaulting to broad, convenient permissions that happen to avoid permission-related errors during development but that create unnecessary risk in production.

Correcting overly permissive settings requires genuine understanding of what access level each specific file or directory actually needs for legitimate functionality — this sometimes requires careful testing to ensure tightened permissions don't inadvertently break legitimate application functionality that was relying on the previously overly broad access, making this a task warranting genuine care rather than blanket permission restriction applied without understanding actual functional requirements.

How to do it

  1. 1
    Review your file permissions
    Via your hosting control panel or direct server access, check current permission settings across your site files.
  2. 2
    Identify anything world-writable
    Permissions allowing write access to anyone, not just the specific user or group that should have it.
  3. 3
    Correct permissions to the minimum genuinely needed
    Typical safe defaults are 644 for files and 755 for directories, with narrower exceptions only where genuinely required.
  4. 4
    Re-check after any major site change
    A migration or bulk file upload can sometimes reset permissions incorrectly.

Common mistakes

How you will know it is done

No world-writable files remain, and permissions across the site follow least-privilege defaults.

Track this in your hive

The Security Ring turns this into a real, permanent mission — mark it complete once you have genuinely done it.

Open this mission in H.I.V.E. →