Fixing Apache’s “Permission Denied: Search Permissions Missing” Error on Linux

I wrote these tutorials for myself in future when I forget for the next steps.
Search for a command to run...

I wrote these tutorials for myself in future when I forget for the next steps.
No comments yet. Be the first to comment.
When you provision an Ubuntu instance on Oracle Cloud, you'll notice something different from standard Ubuntu installations: the system uses iptables instead of ufw for firewall management. This disti

When developing web applications locally, HTTPS is often overlooked. Yet, modern browsers and APIs increasingly require secure connections—even in development. That’s where mkcert comes in: a simple t

Testing the checkout success page in Magento 2 can be frustrating. By default, once an order is placed, Magento clears the quote session, meaning you can’t simply refresh or revisit the success page without going through the entire checkout process a...

Magento Commerce (EE) offers powerful features, but for many teams, Open Source (CE) is leaner, lighter, and more sustainable. If you're migrating from EE to CE, the Opengento downgrade tool provides a clean, scriptable way to remove proprietary modu...

If you’ve ever checked your Apache error logs and seen something like this:
Code
[core:error] (13)Permission denied: access to /robots.txt denied (filesystem path '/home/username/sites') because search permissions are missing on a component of the path
…you’ve run into a classic Linux filesystem permissions problem. The good news? It’s easy to fix once you understand what’s going on.
In Linux, directories need execute (x) permission for a user or process to “search” or traverse them. Even if a file like /robots.txt has the right read permissions, Apache can’t serve it unless it can walk through every directory in the path.
If any parent directory in /home/username/sites/... is missing execute permission for Apache’s user (apache, www-data, or similar), you’ll get this error.
Check Apache’s user
bash
ps aux | grep httpd # Apache
ps aux | grep nginx # Nginx with php-fpm
Check permissions on each directory in the path
bash
namei -l /home/username/sites
This shows the permissions for each component of the path.
Quick and simple:
bash
chmod o+x /home
chmod o+x /home/username
chmod o+x /home/username/sites
Add Apache’s user to your group:
bash
sudo usermod -a -G yourgroup apache
Change group ownership and set execute for group:
bash
sudo chgrp -R yourgroup /home/username/sites
chmod g+x /home /home/username /home/username/sites
Many developers keep their web projects under /home/<user>/ for convenience. By default, home directories are locked down so other users (including the web server process) can’t traverse them. Apache needs at least execute permission to reach the public folder in your Laravel, WordPress, or static site.
Keep your web root in /var/www/ or another directory Apache already has access to.
If you must serve from your home directory, adjust permissions carefully — don’t just chmod 777.
Use namei -l to quickly spot where permissions break.
In short: This error isn’t about the file itself, it’s about Apache’s ability to walk the path to it. Give the web server execute permission on each parent directory, and your 403 Forbidden will vanish.