简体   繁体   中英

Server unable to read htaccess file, denying access to be safe

403 FORBIDDEN

You don't have permission to access/folder_name/index.php on this server.

Server unable to read .htaccess file, denying access to be safe

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

Here is .htaccess code:

<Files 403.shtml> 
order allow,
deny allow from all 
</Files> 

And I also tried another code:

<Directory "/path/to/source/file/directory/www"> 
Options Indexes FollowSymLinks 
AllowOverride all 
Require all granted 
</Directory> 

But I am confused on the line "path/to/source/file/directory/www".

Make sure that the .htaccess file is readable by apache :

chmod 644 access/folder_name/.htaccess 

And make sure the directory which contains .htaccess is readable and executable:

chmod 755 access/folder_name/

If you are using cpanel , then go to the public HTML folder or else which subfolder creating the problem. right click the folder, you get the option, change permission. make alternative changes accordingly so you can make live your web page在此处输入图片说明

I had the same issue. I am on rackspeed and use cpanel. I created a subdomain which also created the base folder. But I deleted the base folder and created it again, which caused the error.

I had to open the subdomain configuration and edit the base directory. The correct base directory was already entered but I had to do It again nevertheless, to make it reinitialize.

  1. Go to the terminal on linux
  2. Path to your html folder
  3. sudo chmod -R 777 your_directory_name

Where 'your_directory_name' is the directory that contains .htaccess file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM