WordPress Site Permissions and Ownership

Published 2026-11-29 · Updated 2026-11-29 · 8 min read · Sora Panel team

WordPress file permissions work only in the context of the users and processes that access those files. A numeric mode alone cannot tell you whether PHP can upload an image, whether an unrelated site can read configuration, or whether an administrator can deploy a plugin. Begin with ownership and process identities, then grant the minimum access needed for each workflow.

Illustration: protected site files and separate access boundaries
Illustration, not a product screenshot.

Separate identities and responsibilities

List the deployment account, the web server identity and the PHP-FPM pool identity for this particular site. They may be the same or different depending on the host. Also identify scheduled-job accounts, backup agents and any other sites sharing the machine. Determine which identity owns the code, which needs to read it and which needs to write uploads, cache or generated files.

On Linux, a file has an owner, a group and permission bits for owner, group and other users. A process may also have access through supplementary groups, access-control lists or privileged capabilities. A directory's execute bit means traversal, not execution of every file inside it. A writable parent directory can permit entries to be replaced or deleted even when an individual file itself is not writable.

The WordPress permissions handbook notes that the correct scheme varies by host. Treat its example modes as starting points for a particular architecture, not universal instructions. A restrictive mode that breaks the PHP reader is an outage; a permissive mode shared across sites can expose or alter another site's data.

Path or identityTypical needCheck before changing
Application codeDeploy account writes; runtime readsHow core, plugins and themes receive updates
Uploads and generated cacheApplication writes only where neededActual pool identity, directory ownership and ACLs
Configuration and secretsApplication can read; unrelated accounts cannotParent traversal, group membership and backups
Scheduled tasksRun as an intended site identitySame filesystem and database access as the workflow requires

Map these responsibilities before using a control panel's repair button. A deployment process that writes as root and a PHP process that writes as the site user can create files owned by different accounts; the next update or backup may then fail. Document which actor is responsible for fixing ownership, and make the normal deployment process preserve the intended model.

Inspect before changing anything

Start from the actual configured document root and pool configuration, not a guessed path. Inspect ownership and permissions on the site's root, its parent directories, the configuration file and the specific failing directory. On a Linux host, ls -ld /path/to/site /path/to/site/wp-content/uploads reports directory entries without changing them; replace both placeholders with verified paths. namei -l /path/to/site/wp-content/uploads helps inspect each directory in the traversal path where the utility is available.

Ask the administrator to inspect the active PHP-FPM pool's user and group and the web-server configuration. id site-user shows the groups of a named account; substitute the verified pool account. Examine ACLs with getfacl where installed and applicable, and check mandatory access control such as SELinux or AppArmor when ordinary permissions look correct. These are read-only investigations; do not print the contents of configuration files or credentials into shared logs.

Test a specific operation, such as uploading an approved small test image, and examine the corresponding application and server error logs. A failed upload may be caused by storage exhaustion, PHP limits, a temporary directory, a security policy or an external object store rather than mode bits. Remove the test object through the normal application workflow if it is no longer needed.

Keep a record of the original owners, groups, modes and ACLs before an approved change. Test first in a representative staging environment and retain a tested recovery point. If you cannot identify the failing process and target directory, stop rather than making every file writable.

Grant narrow write access

A common model makes application code writable by a trusted deploy identity and readable by the runtime, while limiting runtime writes to explicitly identified data directories. Some sites require the runtime to perform core or plugin updates; others deploy updates outside the web process. Choose deliberately: making code read-only to PHP can reduce the impact of a compromised application, but it changes the update workflow and requires a reliable alternative.

The WordPress hardening guide recommends restricting write access and identifies configuration as sensitive. Keep wp-config.php readable by the application identity but not by unrelated users, and ensure backups and logs do not expose its credentials. A mode such as 640 only works if its ownership and group match the intended readers; it is not a command to apply blindly.

Uploads, caches and plugin-specific directories need individual decisions. The runtime should not need write access to every theme and core file just because media uploads are enabled. Where multiple accounts must cooperate, use a dedicated trusted group or an explicit ACL scoped to the required path. Review inherited ACLs, umask and new-file behavior as well as the files already present. On a shared server, a broadly shared web group may defeat the intended separation.

Never apply 777 as a generic fix: it makes the target writable by all local users allowed to reach it. Likewise, recursive chmod or chown over a whole installation can change secrets, executable scripts, symlink targets or directories with special requirements. Restore from the recorded baseline or make a reviewed, narrowly scoped change instead.

Keep application access separate from filesystem access

WordPress roles control application capabilities; Linux ownership controls operating-system access. They are separate layers. The roles and capabilities reference distinguishes administrators, editors and other roles, with additional network-level responsibilities in multisite. Give each person the access their work requires and review privileged accounts when responsibilities change.

An administrator who can install code or alter a vulnerable plugin can create risk even if filesystem modes are sensible. Conversely, a user with SSH access or a deployment credential may change application files without logging into WordPress. Review both paths, enforce strong authentication and protect backups and database credentials. Application-level access checks and timely updates remain necessary even when the runtime cannot modify its own code.

Most reported vulnerability types in 2024

Selected classifications from Patchstack's 2025 report; share of reported vulnerabilities

  • Cross-site scripting
    47.7
  • Broken access control
    14.19
  • Cross-site request forgery
    11.35
  • SQL injection
    5.08
  • Sensitive data exposure
    4.29
Selected report categories, not a breakdown of incidents or permission failures. Remaining categories are omitted. Reported percentages transcribed from the report's chart data; https://patchstack.com/_astro/PPVulns2025.DANbAOuG.js. Dataset is 2024, published in the 2025 report; discovery and reporting are influenced by research incentives. Source: Patchstack State of WordPress Security in 2025, most commonly reported vulnerabilities chart, viewed 2026-11-29.
View chart data
ItempercentNote
Cross-site scripting47.7
Broken access control14.19
Cross-site request forgery11.35
SQL injection5.08
Sensitive data exposure4.29

The chart uses Patchstack's 2025 report, which analyzes vulnerabilities reported in 2024. Its chart lists vulnerability classifications, not incidents caused by filesystem permissions. XSS, access-control failures and request forgery call for application-level defenses; directory ownership does not fix missing authorization. The report also notes that research incentives influence which vulnerability types are found, so these proportions are not a probability that any particular site will be compromised.

Make an approved change and verify

For the identified path, decide the intended owner, group and minimal permissions based on the actual actors. Make only the reviewed change, preferably through the site's documented provisioning or deployment method so the next release does not undo it. Confirm parent-directory traversal, group membership and ACLs. Verify both positive access for the intended process and negative access for unrelated site identities using an authorized test; do not attempt to inspect another tenant's private files.

Repeat the failed workflow, then check login, publishing, uploads, scheduled jobs and the normal deployment or update mechanism. A successful upload alone does not prove that configuration is protected. Verify backups can still read the required files, and that recovery does not restore broader access than intended. Record what changed, why, who approved it and how to restore the previous state.

If the application needs a temporary writable code path for an update, define who enables it, how long it remains enabled and how it is verified afterwards. Do not make a permanent exception simply because a single maintenance operation needed access. When the application is compromised, permission changes alone are not a cleanup procedure: preserve evidence, isolate according to the incident plan, investigate and restore from a known-good source where appropriate.

Use integrity checks and maintain the boundary

The WP-CLI checksum command compares WordPress core files with published checksums and avoids loading WordPress for that verification. On an authorized host with WP-CLI installed, wp core verify-checksums --path=/path/to/site is a read-only comparison after replacing the path. Investigate unexpected results in context; customized files, an incorrect locale or version and network errors need different responses.

Core checksums do not verify every plugin, theme, upload or server configuration and a passing result does not establish that a site is clean. Combine integrity checks with an inventory, patch management, monitored logs and a tested restore. Revisit the permission model after changing PHP pools, moving servers or changing the deployment user. A boundary that is documented and exercised is easier to preserve than an undocumented collection of numeric modes.

For the lifecycle around changes, see WordPress update planning. Sora Panel is not released yet; read how it works.

Frequently asked questions

Are 755 and 644 always correct?

No. Access depends on ownership, groups, runtime identity, ACLs and the site's update workflow.

Should uploads be 777?

No. Identify the actual writer and grant it access to the required directory without making it writable to all users.

Does restricting file writes fix a vulnerable plugin?

No. It can limit some effects but cannot replace application authorization, updates and vulnerability response.

Do core checksums verify the whole site?

No. They compare WordPress core files with published checksums, not all plugins, uploads or server configuration.

Sources

Sora Panel is not released yet. Read how it works on the homepage.