I can't find public_html and I can not create files or folder in file manager within my website using my user in hestiacp

Hello, I can’t access my website’s file manager from hestiacp. When I enter the file manager it does not show folders, only the options; create folders and files, but when I try to create and save it I get the following message; (unknown error). I was able to access the public_html folder from cmd on my computer. I want to clarify that I am trying this with a new user that I have created in hestiacp, but it does not allow me to access either with the admin user or with the new user. Please, I would appreciate your help.

English please…

1 Like

Please, check it now, thank U.

could you Help me, please?

Use the search function…

It has been handled 100 times before …

Also start debugging bij checking /var/log/hestia/nginx-error.log

Good starting point:

Analysis of NGINX error log

The provided NGINX error log indicates several instances of an “Uncaught League\Flysystem\Sftp\InvalidRootException” error. This means that the Flysystem library, which is used to interact with the SFTP server, is encountering an issue with the root directory.

Here’s a breakdown of the error message:

  • PHP Notice: Invalid SFTP packet size
  • PHP Notice: Expected SSH_FXP_VERSION
  • PHP Fatal error: Uncaught League\Flysystem\Sftp\InvalidRootException: Root is invalid or does not exist: /

This suggests that:

  1. There is an issue with the communication between PHP and the SFTP server.
  2. The library is expecting a specific response from the server, but it’s receiving something different.
  3. The root directory specified for the SFTP connection is either invalid or does not exist.

The stack trace indicates the following sequence of events:

  1. SftpAdapter.php(208): The SftpAdapter attempts to set the connection root directory.
  2. AbstractFtpAdapter.php(650): The adapter tries to establish a connection with the SFTP server.
  3. SftpAdapter.php(360): If the connection is successful, the adapter retrieves the connection object.
  4. AbstractFtpAdapter.php(338): The adapter tries to list the contents of the root directory.
  5. Filesystem.php(272): The Flysystem library attempts to access the files listed by the adapter.
  6. Filesystem.php(199): The library encounters the “InvalidRootException” due to the invalid or non-existent directory.

Possible causes:

  • Incorrect configuration: The SFTP connection details (host, username, password, port, root directory) might be incorrect.
  • Permissions: The user might not have sufficient permissions to access the specified root directory.
  • SFTP server issues: The SFTP server itself might be experiencing problems.


Here are some steps you can take to troubleshoot the issue:

  1. Verify SFTP connection details: Double-check the host, username, password, port, and root directory specified for the SFTP connection. Ensure they are accurate and match your SFTP server configuration.
  2. Check user permissions: Make sure the user used for the SFTP connection has read and write access to the specified root directory.
  3. Test SFTP connection manually: Use an SFTP client like WinSCP or FileZilla to connect to the server using the same credentials and root directory. This will help confirm if the issue is specific to the Flysystem library or a general connection issue.
  4. Review Flysystem configuration: Check the configuration of the Flysystem adapter to ensure it’s using the correct SFTP connection details and root directory.
  5. Enable debug logging: Enable debug logging for both the Flysystem library and the SFTP server to obtain more detailed information about the error. This can help identify the specific cause of the communication issue.
  6. Seek support: If you’re unable to resolve the issue on your own, consider seeking help from the Flysystem library documentation, community forums, or contacting the SFTP server administrator.

By following these recommendations, you should be able to identify the root cause of the “InvalidRootException” error and fix the issue with the SFTP connection.

Chat gtp gave me that advice, but it’s complicated for me, what if I restore hestiaCP and try to do the process from scratch?

Show the output of this command:

grep -rEi 'sftp|AllowUsers|Pubkey|Port' /etc/ssh/sshd_config /etc/ssh/sshd_config.d/

root@srv447660:~# grep -rEi ‘sftp|AllowUsers|Pubkey|Port’ /etc/ssh/sshd_config /etc/ssh/sshd_config.d/
/etc/ssh/sshd_config:#Port 22
/etc/ssh/sshd_config:PubkeyAuthentication yes
/etc/ssh/sshd_config:#GatewayPorts no
/etc/ssh/sshd_config:#Subsystem sftp-server
/etc/ssh/sshd_config:# Hestia SFTP Chroot
/etc/ssh/sshd_config:Match User sftp_dummy99,admin,emarte046
/etc/ssh/sshd_config: ForceCommand internal-sftp

Ok, edit file /etc/ssh/sshd_config and add this option:

Subsystem sftp internal-sftp

Restart sshd:

systemctl restart sshd

nothing yet,

As root, show the output of these commands:

sshd -T | grep sftp
systemctl status sshd