Report this

What is the reason for this report?

Error on apche2 "You don't have permission to access / on this server."

Posted on June 5, 2017

Hi all

i need you help as i face the bellow error when i change the Directory “You don’t have permission to access / on this server.” i change the working directory on /etc/apache2/sites-enabled/000-default.conf <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot “/media/clerck/Downloads/” ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>

&& /etc/apache2/apache2.conf <Directory /home/clerck/Downloads/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory>

on the second file i only change the /var/www/html to the new directory

i even try to give the Directory 777 permission but still the same error



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

First of all change this line

<Directory /home/clerck/Downloads/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory>

to this line

<Directory /media/clerck/Downloads/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory>

And if it doesn’t work try to add those lines at /etc/apache2/apache2.conf

<Directory /media/clerck/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory>

sorry i miss with the file name, it didn’t work untill i apply this command sudo chown -R www-data:www-data /media/clerck/Downloads

i face another issue when i try to use the real Directory, i change it on both files /etc/apache2/apache2.conf && /etc/apache2/sites-enabled/000-deftault.conf but the error appear again and "chown -R www-data:www-data " didn’t solve the issue this from log clerck@clerck:/media/clerck/5b7ea25c-624b-4048-9c50-d3e76c9dc2e6/repos$ tailf /var/log/apache2/error.log [Mon Jun 05 16:50:02.872782 2017] [core:error] [pid 17501:tid 140372126148352] (13)Permission denied: [client 127.0.0.1:50530] AH00035: access to / denied (filesystem path ‘/media/clerck/5b7ea25c-624b-4048-9c50-d3e76c9dc2e6’) because search permissions are missing on a component of the path

this Directoty on external Hard Drive by the way| so now it’s working on /home but didn’t work on the external hard permission changed to 755 but still the same

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.