Directory access is forbidden error in CodeIgniter - php

When I tried to access a folder in localhost, I got:
Directory access is forbidden. 403 forbidden
I had followed a tutorial for CodeIgniter.
So I deleted the .htaccess file, but still can't solve the problem.
Maybe the httpd.conf has some settings wrong?

Related

Sudden forbidden access to wp-admin beacuse of .htaccess file problem

I am currently having a very sudden problem with a website. It was working fine but now when trying to access the wp-admin I get the following error.
Forbidden
You don't have permission to access this resource.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.
I found the .htaccess file in the bluehost login and the permissions are 664, and it seems a have another identical .htacess file in another folder, I don't know if that may be causing the problem.
The .htaccess file looks like this
<FilesMatch ".(py|exe|phtml|php|PHP|Php|PHp|pHp|pHP|phP|PhP|php5|suspected)$"> Order Allow,Deny Deny from all </FilesMatch>
Actually all of my .htaccess files have a editing date two days ago and I don't get why.

403 Forbidden - how to fix?

I'm trying to access an PHP 7.x file on a restricted webspace, but get the famous 403:
Forbidden
You don't have permission to access /path/to/file.php on this server.
After searching on StackOverflow and trying different settings, I set the CHMOD to 777, which didn't change anything.
I've no root nor apache access.
Now I'm trying to allow access via .htaccess, but no success so far:
Order Allow,Deny
Allow from all
Result: 500 - Internal Server Error.
Any idea?
Thanks in advance!

Forbidden Error 403 On Server Folder

I'm trying to host a new blog where I can add posts using a simple HTML form & PHP script. When I test out the form on my localhost everything works fine, but when I upload it and test it live I get:
Forbidden
You don't have permission to access /php/add-post.php on this server.
Additionally, a 404 Not Found error was encountered while trying to
use an ErrorDocument to handle the request.
I know that my host allows this type of script because I'm using exactly the same thing on another blog, and my permissions are set to 0755. Does anyone know what the problem might be & how to solve it?
Add the below code in .htaccess file
<Files add-post.php>
Order Deny,Allow
Deny from all
Allow from all
</Files>
Or run command to provide permission to folder
chmod 774 /path/to/php/add-post.php

Magento new host - 403 Forbidden - Server unable to read htaccess file

I have moved to a new host and setup everything, but when I try to access the site, I get the following 403 Forbidden error
Forbidden
You don't have permission to access /webfiles on this server. Server
unable to read htaccess file, denying access to be safe
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Any ideas on the problem?
very easy just go to your main directori example
home/example
go to the directory public html and then go to you setting by the fault the system goes to 754 you will have to change to 755 the last 5 is go ing to allow to get to the site. cheers
I figured it out right after I posted. it was the file permission problem in the main root

Wordpress - Got both 403 Forbidden and 500 Internal server

Suddenly my blog gives me this error below: (It works fine just an hour ago)
Forbidden
You don't have permission to access /blog/index.php on this server.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
My wordpress installation is in www.my-domain.com/blog. But I can still access the wp-admin.
I checked the permission using FTP and it's all correct (755 for directory and 644 for file)
I also tried deleting htaccess and let Wordpress re-create it by changing the permalink.
Some say it's hosting problem but I just create another Wordpress blog in /blog2 and it works fine.
Any solution? Thanks.
[EDIT]
I just realized that the index.php file permission is 00, but I can't change the permission through FTP. It says 550 Could not change perms on index.php: Permission denied. Any idea?
The permission on /blog/index.php was set to 00. Changing it to 644 solves the problem.
In my case, I can't change the permission through FTP. So I deleted the index.php and uploaded a new fresh one.
for 500 Internal server error, check your htaccess

Categories