PHP files showing error "403 Forbidden"

Status
Not open for further replies.

clemonx1

New Member
Messages
2
Reaction score
0
Points
0
Hi,

Are PHP files supposed to present "403 Forbidden" here?

I have a file: test.php
<?php

echo "TEST";

?>

http://clemon.x10.mx/free/info.php : which new presents:
[h=1]403 Forbidden[/h]
Access to this resource on the server is denied!

Powered By LiteSpeed Web Server
[FONT=Verdana, Arial, Helvetica][SIZE=-1]LiteSpeed Technologies is not responsible for administration and contents of this web site![/SIZE][/FONT]​
 
Last edited:

Livewire

Abuse Compliance Officer
Staff member
Messages
18,169
Reaction score
216
Points
63
Just to save the link-click if needbe, I checked on the server - you have the permissions set to 777 which is a security risk, so the server is refusing to process the file. Folders should be no higher than 755, files no higher than 644. You can either change the permissions through cPanel, or FTP, but in either case if you change the permissions down to 644 the file should no longer throw a 403 Forbidden (or if it does, it won't be related to a permissions issue anymore).
 

bdistler

Well-Known Member
Prime Account
Messages
3,534
Reaction score
196
Points
63
Just to save the link-click if needbe, I checked on the server - you have the permissions set to 777 which is a security risk, so the server is refusing to process the file. Folders should be no higher than 755, files no higher than 644. You can either change the permissions through cPanel, or FTP, but in either case if you change the permissions down to 644 the file should no longer throw a 403 Forbidden (or if it does, it won't be related to a permissions issue anymore).

If you have a line with [ XBitHack on ] in your .htaccess file and use SSI in files with the [ .html ] file extension ( not [ .shtml ] ) - then files that you want parsed (which contain SSI directives) set the permissions at 744 (instead of 644). This is what tells the server to parse the file and is only set on files with includes - not on included files which are set at 644

Python script files with [ .py ] file extension and Perl script files with [ .pl ] file extension need to be set at 750

if you do not set the permission right you will receive a [ Permission denied ] or other type of error
 

clemonx1

New Member
Messages
2
Reaction score
0
Points
0
Thanks for the information! It works now because the permissions follow your guidelines. Thanks again. :)
 
Status
Not open for further replies.
Top