Jump to content

Recommended Posts

Posted

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

Posted

Can you try to rename or delete your htaccess file using FTP since cpanel won't work?

 

I just checked and you're not blocked or suspended or anything. If need be, try resetting your password too.

Posted

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

Posted

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

Posted

The first log is FTPS which definitely won't work, and you're using the wrong settings for SFTP

 

Host: tommy.heliohost.org

Port: 1342

Protocol: SFTP

Logon type: Normal

User: christos

Password: <same as cpanel>

Posted

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

Posted

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.

Posted

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

Posted

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.

Posted

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!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...