Linux, Web Server & Database

Fix Apache Permission Error

Fix file and directory permission errors stopping Apache from serving or writing to your site correctly.

The Problem

Apache can't read your site's files, write to an upload folder, or execute a script — showing a 403 Forbidden error or a silent failure — because the file ownership or permissions don't match what the Apache process user needs.

About this problem

Permission errors happen when files are owned by the wrong user (often root, after an upload via a root SSH session, or a different user than Apache's own process account), or when permissions are set too restrictively for Apache to read, write or execute what it needs — this is one of the most common causes of mysterious 403 errors and silent upload or caching failures.

It often shows up right after a manual file upload via SFTP as root, a migration from another server, or after a backup restore that didn't preserve the original ownership.

What's Included

What's NOT Included

How It Works

  1. Identify the specific files or directories triggering the error from Apache's error log.
  2. Check current ownership and permissions against what's actually needed (read for static files, write for upload directories, execute where applicable).
  3. Correct ownership to the Apache process user (often www-data or apache) rather than leaving it as root or another account.
  4. Set permissions following the principle of least privilege — no wider than genuinely necessary.
  5. Test the specific previously-failing functionality (page load, file upload, cache write) to confirm it now works correctly.

In practice: you buy the service, send over whatever access or details the job needs, I investigate and do the work, and you confirm it's resolved before we call it done.

Frequently Asked Questions

Why do I get a 403 Forbidden error even though the file exists?
A 403 for an existing file almost always means Apache's process user doesn't have permission to read it, rather than the file genuinely being missing.
What user does Apache run as?
Commonly www-data on Debian/Ubuntu or apache on CentOS/RHEL-based systems, though it can be configured differently depending on the setup.
Is it safe to set all file permissions to 777?
No — that grants read, write and execute to everyone, which is a serious security risk; permissions should be set as narrowly as the application actually requires, not wide open 'just to make it work'.
Why can't WordPress upload images after a server migration?
Usually because the uploads folder's ownership didn't transfer correctly and Apache's process user lacks write permission to it on the new server.
How do I check current file ownership on Linux?
The ls -la command in a directory lists each file's owner and group alongside its permission bits.
Will fixing permissions break anything else on my site?
Not if done correctly — permissions are set based on what Apache specifically needs, so the fix should resolve the error without opening anything unnecessarily wide.
Please note: the price shown applies to a standard case matching the description above. Every situation is different, and if your request falls outside the normal scope of this service, I will explain this before doing any additional chargeable work. I will never silently turn a small job into an expensive project.
Running into an issue with a service you've already bought, or unsure which one fits your problem? Message me directly on WhatsApp — no ticket system, no bot.