See all Apache Webserver related FAQ
Why I am getting “Forbidden – You don’t have permission to access” error message? I am using Apache web server and my directory is located at /home/myname/public_html path. How do I resolve this issue?

The permissions on your Web page where files are stored are not correct. Login over the ssh session and use the chmod command to setup correct permission. Go to directory (for example public_html or /var/www/html/dir/ using the cd command).
Tutorial details
Difficulty level Easy
Root privileges No
Requirements Linux terminal
Category Web Server
OS compatibility BSD Linux Unix
Est. reading time 1 minutes

Forbidden – You don’t have permission to access this page error and solution

Type the commands:
cd /var/www/html/
Then set the correct permission using the chmod command as follows:
chmod 755 *
chmod o+x ./
If you have more subdirectories use the -R option. For instance:
$ chmod -R 755 *
If you have access to Apache configuration file check out for these tips to get rid of Apache 403 forbidden error.

🥺 Was this helpful? Please add a comment to show your appreciation or feedback.

nixCrat Tux Pixel Penguin
Hi! 🤠
I'm Vivek Gite, and I write about Linux, macOS, Unix, IT, programming, infosec, and open source. Subscribe to my RSS feed or email newsletter for updates.

20 comments… add one
  • Nthabiseng Apr 16, 2012 @ 5:46

    Im struggling to log in twitter,it says 403forbiden when i try 2log in.pls help.

  • raman May 25, 2012 @ 3:43

    my security question and pasword donot change how to change the password and security question

  • Ramprasad Velavarthipati Jun 7, 2012 @ 19:37

    disable SELINUX

  • SpaceDust_ Aug 4, 2012 @ 5:35

    $ chmod o+x ./
    above command worked for me I use Mac 10.7 with apache, rest of the commands didnt work

  • kamal Dec 10, 2012 @ 2:37

    restorecon -rv /var/www/html

    • Abel Sep 22, 2014 @ 9:24

      Worked for me… Thanks

  • progr May 30, 2014 @ 6:19

    im getting errors of


    You don’t have permission to access / on this server.

    folder i got is aqw-progr but if i put 192.168.1.x in say dont have access i want to public thew portforward but i cant without error

    my website server called uniform server

    specs is

    Server Specification – Plugins
    Apache 2.4.9 VC10 openssl-1.0.1g
    MySQL 5.5.37-community
    MySQL 5.6.17-community
    Mariadb 5.5.37
    Mariadb 10.0.11
    PHP : 5.2.17
    PHP : 5.3.27-5.3.28
    PHP : 5.4.19-5.4.28
    PHP : 5.5.3-5.5.12
    PHP : 5.6.0_beta3
    phpMyAdmin 4.2.2
    phpMyBackupPro 2.4

    Adminer 3.7.1 – 4.1.0
    Strawberry Perl
    ActivePerl via Installer
    APC – Dependent on PHP version
    eAccelerator – Dependent on PHP version
    XCache – Dependent on PHP version
    Zend OpCache – Dependent on PHP version
    OpenSSL 1.0.1g
    msmtp 1.4.32 – Mail client for PHP
    Cron – Scheduler
    DtDNS – IP address updater

    so can you help me try public my website pls all i wanted do is make and get access to promission all i can is localhost my friend say can not get access

    pm me on to help me fix this problem

    i got about 3 linux server im useing one for website but my linux server crashed i had error booting up so i try do on my laptop

    i will lose this website im going turn off my pc soon and try fix my processor

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre> for code samples. Your comment will appear only after approval by the site admin.