Jump to content

[Solved] Error "403 Forbidden"


chrmina

Recommended Posts

Hello people!

 

I was in the process of modifying the attributes of some php files (changing from 664 to 644) I have recently uploaded and suddenly was disconnected from the server.

 

When I tried to access my site it gave me "403 Forbidden" error. I am also not able to connect to CPanel (it gives me some warning and a fatal error). Can you please check what's going on and help me regain access to my site?

 

Here is the error:

 

 

Forbidden

You don't have permission to access / 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.

 

 

 

 

username: christos

server: Tommy

 

Thank you!

 

Chris

Link to comment
Share on other sites

I've tried but access was denied. Directory listing denied. here is the output from my FTP Client (FileZilla):

 

Status: Resolving address of christos.heliohost.org
Status: Connecting to 65.19.143.6:21...
Status: Connection established, waiting for welcome message...
Status: Logged in
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/" is your current location
Command: TYPE I
Response: 200 TYPE is now 8-bit binary
Command: PASV
Response: 227 Entering Passive Mode (65,19,143,6,206,118)
Command: MLSD
Response: 150 Accepted data connection
Response: 421-Sorry, we were unable to read [.]
Response: 421-Options: -a -l
Response: 421-0 matches total
Response: 421 chdir: Permission denied
Error: Failed to retrieve directory listing
Status: Connection closed by server

Link to comment
Share on other sites

Nope. It fails when tries to retrieve the Directory Listing:

 

 

Status: Resolving address of christos.heliohost.org
Status: Connecting to 65.19.143.6:21...
Status: Connection established, waiting for welcome message...
Status: Initializing TLS...
Status: Verifying certificate...
Status: TLS connection established.
Status: Logged in
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/" is your current location
Command: TYPE I
Response: 200 TYPE is now 8-bit binary
Command: PASV
Response: 227 Entering Passive Mode (65,19,143,6,241,187)
Command: MLSD
Error: Connection timed out after 20 seconds of inactivity
Error: Failed to retrieve directory listing
Status: Disconnected from server
Status: Resolving address of christos.heliohost.org
Status: Connecting to 65.19.143.6:21...
Status: Connection established, waiting for welcome message...
Status: Initializing TLS...
Status: Verifying certificate...
Status: TLS connection established.
Status: Logged in
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/" is your current location
Command: TYPE I
Response: 200 TYPE is now 8-bit binary
Command: PASV
Response: 227 Entering Passive Mode (65,19,143,6,251,187)
Command: MLSD
Error: Connection timed out after 20 seconds of inactivity
Error: Failed to retrieve directory listing

 

 



And here is the log trying to connect via SFTP:

Status: Connecting to christos.heliohost.org...
Response: fzSftp started, protocol_version=8
Command: open "christos@christos.heliohost.org" 22
Error: Network error: Connection refused
Error: Could not connect to server
Status: Waiting to retry...
Status: Connecting to christos.heliohost.org...
Response: fzSftp started, protocol_version=8
Command: open "christos@christos.heliohost.org" 22
Error: Network error: Connection refused
Error: Could not connect to server

Link to comment
Share on other sites

Thank you. Managed to connect but there are no files in my directory! What happened?

 

Status: Connecting to tommy.heliohost.org:1342...
Status: Connected to tommy.heliohost.org
Status: Retrieving directory listing...
Status: Listing directory /home/christos
Status: Directory listing of "/home/christos" successful

 

 

OKtVkqb.jpg

Link to comment
Share on other sites

There must be something wrong with your FTP client. I see files dating back to January 2017 (when you created your account.)

 

Are things working better now? I think you managed to change the permission of your home folder to 644. It's supposed to be 755.

Link to comment
Share on other sites

Yes, everything is working fine now! Thank you for your kind help and your patience!

I think you managed to change the permission of your home folder to 644. It's supposed to be 755.

I don't even know how I managed to do that! I uploaded a CakePHP app to test it but somehow the directories were uploaded as 775 and the files as 664. I was manually changing them (directories and files) to 755 and 644 manually using the CPanel file manager and that's when the problem occurred.

 

Once again, thanks!

 

Chris

Link to comment
Share on other sites

Yeah, the file and folder permissions do that when uploaded over SFTP, and they indeed need to be fixed to get the software working. You get 500 errors when stuff is writable by the group.

Yes, I found out from another post. Thanks!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...