PHP files showing error "403 Forbidden"

Discussion in 'Free Hosting' started by clemonx1, May 25, 2013.

Thread Status:
Not open for further replies.
  1. clemonx1

    clemonx1 New Member

    Messages:
    2
    Likes Received:
    0
    Trophy 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!
    [HR][/HR]
    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: May 25, 2013
  2. bdistler

    bdistler Well-Known Member Prime Account

    Messages:
    3,534
    Likes Received:
    195
    Trophy Points:
    63
  3. Livewire

    Livewire Abuse Compliance Officer Staff Member

    Messages:
    18,099
    Likes Received:
    209
    Trophy 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).
     
  4. bdistler

    bdistler Well-Known Member Prime Account

    Messages:
    3,534
    Likes Received:
    195
    Trophy Points:
    63
    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
     
  5. clemonx1

    clemonx1 New Member

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Thanks for the information! It works now because the permissions follow your guidelines. Thanks again. :)
     
Thread Status:
Not open for further replies.

Share This Page