Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask question.(5)

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

ITtutoria

ITtutoria Logo ITtutoria Logo

ITtutoria Navigation

  • Python
  • Java
  • Reactjs
  • JavaScript
  • R
  • PySpark
  • MYSQL
  • Pandas
  • QA
  • C++
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Python
  • Science
  • Java
  • JavaScript
  • Reactjs
  • Nodejs
  • Tools
  • QA
Home/ Questions/Quick solution to fix the error: server unable to read htaccess file, denying access to be safe.
Next
Answered
Mya White
  • 33
Mya White
Asked: May 18, 20222022-05-18T17:39:23+00:00 2022-05-18T17:39:23+00:00In: Programs

Quick solution to fix the error: server unable to read htaccess file, denying access to be safe.

  • 33

. Advertisement .

..3..

. Advertisement .

..4..

I get an error

Forbidden

You don't have permission to access /recipefinder on this server. Server unable to read htaccess file, denying access to be safe

when trying to host a simple app using AngularJS in my website. How to fix the server unable to read htaccess file, denying access to be safe error? Please give me some advice.

  • 2 2 Answers
  • 1k Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook
  • Report

2 Answers

  • Voted
  • Oldest
  • Recent
  • Random
  1. Best Answer
    lyytutoria Expert
    2022-06-13T23:31:09+00:00Added an answer on June 13, 2022 at 11:31 pm

    The cause:

    When you set up a new website on a GoDaddy virtual server, there is a problem with it. This is the reason which causes the error: ”server unable to read htaccess file, denying access to be safe”.

    Solution:

    If you have SSH permission to access to the server (it must be permitted on cPanel), let’s login to your account. After you login successfully, your account will be put in the main directory. Your website’s DocumentRoot is placed in the public html subdirectory. The permissions for this directory are set to 750 by GoDaddy by default, but these permissions are insufficient for Apache to view the files for the website. It’s neccessary to convert the permissions for this directory to 755 (such as chmod 755 public_html).

    Then place your website’s files in the public html directory (both rsync and scp are used for copying files to a GoDaddy Linux server).

    You have to make sure that all of the files under public html are publicly accessible. Use the following command to do this:

    cd public_html
    
    chmod -R o+r *    

    Make sure that additional subdirectories (e.x. css, js, and image) are world accessible by allowing the world access to both read and execute:

    chmod o+rx css
    chmod o+rx img
    chmod o+rx js

    Finally, you’ll need a.htaccess file in the public_html directory. If you do not have a.htaccess file in your public_html directory, GoDaddy will apply a rule that prevents the site from loading. This file can be created with vi (“vi .htaccess”). In the file, let’s type the following lines:

    Order allow,deny
    Allow from all
    Require all granted

    This configuration is compatible with both Apache 2.2 and Apache 2.4. Save the file (ZZ), and then check whether it has 644 permissions or not:

    chmod 644 .htaccess
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  2. Rose Berthet
    2022-05-25T20:41:09+00:00Added an answer on May 25, 2022 at 8:41 pm

    This was the same problem that I faced. I suggest looking in the server error log file. It was the fact that the top directory of the project was not accessible. This was clearly indicated in the error log. This is a simple example of a simple

    sudo chmod 755 <site_top_folder>

    It was fixed for me.

    • 17
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

Sidebar

Ask A Question
  • How to Split String by space in C++
  • How To Convert A Pandas DataFrame Column To A List
  • How to Replace Multiple Characters in A String in Python?
  • How To Remove Special Characters From String Python

Explore

  • Home
  • Tutorial

Footer

ITtutoria

ITtutoria

This website is user friendly and will facilitate transferring knowledge. It would be useful for a self-initiated learning process.

@ ITTutoria Co Ltd.

Tutorial

  • Home
  • Python
  • Science
  • Java
  • JavaScript
  • Reactjs
  • Nodejs
  • Tools
  • QA

Legal Stuff

  • About Us
  • Terms of Use
  • Privacy Policy
  • Contact Us

DMCA.com Protection Status

Help

  • Knowledge Base
  • Support

Follow

© 2022 Ittutoria. All Rights Reserved.

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.