Q. Why I am getting this error message? I am using Apache web server and my directory is located at /home/myname/public_html.

A. The permissions on your Web page are not correct. Login over ssh session and use chmod command to setup correct permission. Go to directory (for example public_html or /var/www/sitename.com/dir/) and type the following command

$ chmod 755 *.*


$ chmod o+x ./

If you have more subdirectories use -R option:
$ chmod -R 755 *.*

If you have access to Apache configuration file check out for these tips to get rid of Apache 403 forbidden error.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 20 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
20 comments… add one
  • William Jun 26, 2007 @ 16:33

    hi, how do you make them open to anyone for perpetuity. for example, everytime i add a folder i have to redo the permissions.

  • Ameen Jul 4, 2007 @ 12:53

    problem in the permistion

  • Chris May 24, 2008 @ 5:14

    I get this error when trying to browse a symlink, and chmoding it had no effect.

  • hotcoder Nov 3, 2008 @ 5:03

    Thanks for kind info.

  • jelmer Jun 11, 2009 @ 8:03

    try chmod -R on the destination of the symlink, its obvious that it wont work because if you chmod the symlink you just make it make accessible for more users but the destination will remain unchanged, however if you chmod the destination it should work ok. Think like making a symlink to your shadow file and trying to chmod your symlink to get permission to the shadow file, that wont work either. Syntax:

    chmod -R <rights> <file>
  • jelmer Jun 11, 2009 @ 8:06

    dear moderator, i see that my post has been changed in the process of posting, i did ‘try chmod -R <rights> <file>’ but the rights and file tags were stripped, would you be so kind to escape char them for me?


  • Clint Oct 29, 2009 @ 14:32

    This worked. On WS_FTP, it’s all but WRITE on GROUP and OTHER.

  • donna Apr 12, 2010 @ 19:58

    why am I forbidden to see my website?

    • vishwa Mar 11, 2011 @ 8:19

      run ps -ef | grep httpd
      and check which user is running apache if you see user nobody then modify your httpd.conf
      file check for User nobody and Group nobody, remove nobody and enter valid user name and restart apache.

  • atul Mar 12, 2011 @ 8:39

    thanxx……it worked !!!!!!!!!!

    • george czukar Jul 4, 2011 @ 22:39

      Why am I forbidden to enter URL?

  • somo Aug 2, 2011 @ 7:07

    Thanks a lot,it worked…

  • 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 http://www.example.co.uk and get access to promission all i can is localhost my friend say can not get access

    pm me on parksade55@yahoo.co.uk 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.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum