File manager: Unknow error

I am using Hestia 1.6.

Now I get this error when I access to the File Manager:

I read multiple topics (like this: File Manager: Unknown error (Error 500)) and test multiple things (like this: docs. hestiacp .com/admin_docs/settings/filemanager.html or this: github .com/hestiacp/hestiacp/issues/880) but it doesn’t work.

The file manager worked normally (maybe until the last update to 1.6?).

I can access to the file system of any user through SFTP without problem.

What more else could I do to get back the file manager working?

Thank you very much.

Check /var/log/hestia/nginx-error.log that is the location where the logs are created.

Thanks. This is the message error in the nginx error log file:

Stack trace:

#0 /usr/local/hestia/web/fm/vendor/league/flysystem-sftp/src/SftpAdapter.php(208): League\Flysystem\Sftp\SftpAdapter->setConnectionRoot()

#1 /usr/local/hestia/web/fm/vendor/league/flysystem/src/Adapter/AbstractFtpAdapter.php(650): League\Flysystem\Sftp\SftpAdapter->connect()

#2 /usr/local/hestia/web/fm/vendor/league/flysystem-sftp/src/SftpAdapter.php(360): League\Flysystem\Adapter\AbstractFtpAdapter->getConnection()

#3 /usr/local/hestia/web/fm/vendor/league/flysystem/src/Adapter/AbstractFtpAdapter.php(338): League\Flysystem\Sftp\SftpAdapter->listDirectoryContents()

#4 /usr/local/hestia/web/fm/vendor/league/flysystem/src/Filesystem.php(272): League\Flysystem\Adapter\AbstractFtpAdapter->listContents()

#5 /usr/local/hestia/web/fm/backend/Services/Storage/Filesystem.php(199): League\Flysystem\Files" while reading response header from upstream, client: XX.YYY.104.132, server: _, request: “POST /fm/?r=/getdir HTTP/1.1”, upstream: “fastcgi://unix:/var/run/hestia-php.sock:”, host: “hestia. hiddingmydomain. com:8083”, referrer: “https:// hestia. hiddingmydomain. com:8083/fm/”

2022/06/29 02:35:47 [error] 788#0: *327 FastCGI sent in stderr: “PHP message: PHP Warning: Undefined array key 0 in /usr/local/hestia/web/fm/configuration.php on line 33” while reading response header from upstream, client: XX.YYY.104.132, server: _, request: “GET /fm/ HTTP/1.1”, upstream: “fastcgi://unix:/var/run/hestia-php.sock:”, host: “hestia. hiddingmydomain. com:8083”, referrer: “https:// hestia. hiddingmydomain. com:8083/list/user/”

2022/06/29 02:35:49 [error] 788#0: *327 FastCGI sent in stderr: "PHP message: PHP Notice: Invalid SFTP packet size in /usr/local/hestia/web/fm/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php on line 3613PHP message: PHP Notice: Expected SSH_FXP_VERSION in /usr/local/hestia/web/fm/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php on line 600PHP message: PHP Fatal error: Uncaught League\Flysystem\Sftp\InvalidRootException: Root is invalid or does not exist: / in /usr/local/hestia/web/fm/vendor/league/flysystem-sftp/src/SftpAdapter.php:279

Stack trace:

#0 /usr/local/hestia/web/fm/vendor/league/flysystem-sftp/src/SftpAdapter.php(208): League\Flysystem\Sftp\SftpAdapter->setConnectionRoot()

#1 /usr/local/hestia/web/fm/vendor/league/flysystem/src/Adapter/AbstractFtpAdapter.php(650): League\Flysystem\Sftp\SftpAdapter->connect()

#2 /usr/local/hestia/web/fm/vendor/league/flysystem-sftp/src/SftpAdapter.php(360): League\Flysystem\Adapter\AbstractFtpAdapter->getConnection()

#3 /usr/local/hestia/web/fm/vendor/league/flysystem/src/Adapter/AbstractFtpAdapter.php(338): League\Flysystem\Sftp\SftpAdapter->listDirectoryContents()

#4 /usr/local/hestia/web/fm/vendor/league/flysystem/src/Filesystem.php(272): League\Flysystem\Adapter\AbstractFtpAdapter->listContents()

#5 /usr/local/hestia/web/fm/backend/Services/Storage/Filesystem.php(199): League\Flysystem\Files" while reading response header from upstream, client: XX.YYY.104.132, server: _, request: “POST /fm/?r=/getdir HTTP/1.1”, upstream: “fastcgi://unix:/var/run/hestia-php.sock:”, host: “hestia. hiddingmydomain. com:8083”, referrer: “https:// hestia. hiddingmydomain. com:8083/fm/”

Can you login with sftp? Use a glient like filezilla, the username and password to test.

I am also facing the same error. File Manager shows unknown error.

I have tried each and everything given on your forums. (forum.hestiacp(dot)com/t/file-manager-unknown-error-error-500/1221/48)

But I am not able to fix it.

:8083/fm/?r=/getdir:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Using Ubuntu 20.04 LTS
HestiaCP 1.6.2

tail -f -s0.1 /var/log/hestia/nginx-error.log

2022/07/07 12:34:44 [error] 786#0: *288 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined array key 2 in /usr/lo                                                                 cal/hestia/web/fm/configuration.php on line 43" while reading response header from upstream, client: 206.84.149.4, server: _, request: "GET /fm/?r=/getuser HTTP/1.1", upstream: "fastcgi://unix:/var/run/hestia-php.sock:", host: "serv1.abc.x                                                                 yz:8083", referrer: "https://serv1.abc.xyz:8083/fm/"
2022/07/07 12:34:44 [error] 786#0: *288 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined array key 2 in /usr/local/hestia/web/fm/configuration.php on line 43 PHP message: PHP Notice:  Error reading from socket in /usr/local/hestia/web/fm/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php on line 3567PHP message: PHP Notice:  Connection closed by server in /us                                                                 r/local/hestia/web/fm/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php on line 1527PHP message: PHP Notice:  Connection closed by server in /usr/local/hestia/web/fm/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php on line 1338PHP message: PHP Notice:  fputs(): Send of 38 bytes failed with errno=32 Broken pipe in /usr/local/hestia/web/fm/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php on line 1275PHP message: PHP Notice:  Connection closed by server in /usr/local/hestia/web/fm/vendor/phps                                                                 eclib/phpseclib/phpseclib/Net/SSH2.php on line 1338PHP message: PHP Notice:  fputs(): Send of 38 bytes failed with errno=32     Broken pipe in /usr/local/hestia/web/fm/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php on line 1275PHP message: PHP Notice:  Connection closed by server in /usr/local/hestia/web/fm/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php on line 1338PH                                                                 P message: PHP Fatal error:  Uncaught League\Flysystem\Sftp\ConnectionErrorException: Could not login with username: admin, host: 127.0.0.1 in /usr/local/hestia/web/fm/vendor/league/flysystem-sftp/src/SftpAdapter.php:244
Stack trace:
#0 /usr/local/hestia/web/fm/vendor/league/flysystem-sftp/src/SftpAdapter.php(207): League\Flysystem\Sftp\SftpAdapter->login()
#1 /usr/local/hestia/web/fm/vendor/league/flysystem/src/Adapter/AbstractFtpAdapter.php(650): League\Flysystem\Sftp\SftpAdapter->connect()
#2 /usr/local/hestia/web/fm/vendor/league/flysystem-sftp/src/SftpAdapter.php(360): League\Flysystem\Adapter\AbstractFtpAdapt                                                                 er->getConnection()
#3 /usr/local/hestia/web/fm/vendor/league/flysystem/src/Adapter/AbstractFtpAdapter.php(338): League\Flysystem\Sftp\SftpAdapter->listDirectoryContents()
#4 /usr/local
2022/07/07 12:34:44 [error] 786#0: *288 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined array key 2 in /usr/lo                                                                 cal/hestia/web/fm/configuration.php on line 43" while reading response header from upstream, client: 206.84.149.4, server: _, request: "GET /fm/?r=/getuser HTTP/1.1", upstream: "fastcgi://unix:/var/run/hestia-php.sock:", host: "serv1.abc.x                                                                 yz:8083", referrer: "https://serv1.abc.xyz:8083/fm/"
2022/07/07 12:34:52 [error] 786#0: *288 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined array key 2 in /usr/lo                                                                 cal/hestia/web/fm/configuration.php on line 43" while reading response header from upstream, client: 206.84.149.4, server: _ , request: "GET /fm/?r=/getdir HTTP/1.1", upstream: "fastcgi://unix:/var/run/hestia-php.sock:", host: "serv1.abc.xy                                                                 z:8083"

I just had a similar issue, but only with one account. It’s not the same but I leave the solution in case anyone gets here as me.

/usr/local/hestia/web/fm/vendor/league/flysystem/src/Filesystem.php(271): League\Flysystem\Adapter\AbstractFtpAdapter->listContents()
...
FastCGI sent in stderr: "PHP message: PHP Warning:  file_get_contents(/home/the_user/.ssh/hst-filemanager-key): failed to open stream: Permission denied in /usr/local/hestia/web/fm/vendor/league/flysystem-sftp/src/SftpAdapter.php on line 299

The file /home/the_user/.ssh/hst-filemanager-key owner was that user instead admin.

Delete that file or chown admin

I had the same problem… after read you all here i finally got it solved my vps.

As usual, i start a clean linux install with this command:
apt update && apt upgrade -y && apt install -y build-essential dialog e2fsprogs nano sudo htop curl screen zip unzip lynx alien dpkg-dev libtool dnsutils gcc bc software-properties-common update-inetd net-tools nmap glances docker docker-compose

And then a standart clean install of Hestia with this command:
bash hst-install.sh --multiphp yes --named no --quota yes --hostname myhost.com.br --email [email protected] --password …

Then I made a fresh install 5 times on different systems (Ubuntu 18.04, Ubuntu 20.04, Ubuntu 22.04, Debian 10 and Debian 11) and had the same problem at all of them.

Then after read the logs (as you sugested here), and realise we were using sftp/ssh, and the content of the folder /home/admin/.ssh/ i had considered if had anything missing since the installation.
And i found out that my vps had PubkeyAuthentication with option “no” setted.

When i changed only this line on my /etc/ssh/sshd_config to “PubkeyAuthentication yes” everything worked.

I’ve already confirmed this solution for on Debian 11 and Ubuntu 20.04 and there’s no error messages and its working as intended.

PubkeyAuthentication with option “no”

It might be a VPS providers template issue. Default OS install should have this enabled by default.

It just sucks that some providers us it …

same problem here try it ty

I get this error as well. It’s frustrating when you can’t access and edit the file manager for sites.

I tried:

  • rm /home/admin/.ssh/*
  • Check if my Public Authentication is Yes (it is)
  • reboot the VPS

I still got the Unknown Error when accessing my File Manager using HestiaCP, for both of my admin and user accounts.

check /var/log/hestia/nginx-error.log

2023/04/07 11:07:10 [error] 3815748#0: *9 FastCGI sent in stderr: "PHP message:>
2023/04/07 11:08:14 [error] 3815748#0: *16 FastCGI sent in stderr: "PHP message>
2023/04/07 14:56:43 [error] 3815748#0: *21 FastCGI sent in stderr: "PHP message>
2023/04/07 21:07:52 [error] 3815748#0: *28 FastCGI sent in stderr: "PHP message>
2023/04/07 21:19:39 [error] 3815748#0: *36 FastCGI sent in stderr: "PHP message>
2023/04/08 03:40:30 [error] 3815748#0: *47 FastCGI sent in stderr: "PHP message>
2023/04/08 06:05:48 [error] 3815748#0: *56 open() "/usr/local/hestia/web/manage>
2023/04/08 06:06:08 [error] 3815748#0: *57 open() "/usr/local/hestia/web/admin/>
2023/04/08 06:06:29 [error] 3815748#0: *58 open() "/usr/local/hestia/web/index.>
2023/04/08 06:06:48 [error] 3815748#0: *59 open() "/usr/local/hestia/web/+CSCOE>
2023/04/08 08:07:39 [error] 3815748#0: *73 open() "/usr/local/hestia/web/manage>
2023/04/08 08:07:59 [error] 3815748#0: *74 open() "/usr/local/hestia/web/admin/>
2023/04/08 08:08:17 [error] 3815748#0: *75 open() "/usr/local/hestia/web/index.>
2023/04/08 08:08:36 [error] 3815748#0: *76 open() "/usr/local/hestia/web/+CSCOE>
2023/04/08 10:17:11 [error] 3815748#0: *87 FastCGI sent in stderr: "PHP message>
2023/04/08 10:36:28 [error] 3815748#0: *107 FastCGI sent in stderr: "PHP messag>
2023/04/08 11:04:46 [error] 3815748#0: *118 FastCGI sent in stderr: "PHP messag>
2023/04/09 01:13:40 [error] 3815748#0: *132 FastCGI sent in stderr: "PHP messag>
2023/04/09 04:13:04 [error] 3815748#0: *167 open() "/usr/local/hestia/web/login>
2023/04/09 04:13:04 [error] 3815748#0: *166 open() "/usr/local/hestia/web/login>
                               [ Read 322 lines ]

Sorry that;s old error. Here’s newest:

2023/04/25 19:13:32 [error] 847#0: *57 FastCGI sent in stderr: "PHP message: PH>
2023/04/25 19:13:35 [error] 847#0: *57 FastCGI sent in stderr: "PHP message: PH>
2023/04/25 19:13:51 [error] 847#0: *57 FastCGI sent in stderr: "PHP message: PH>

2023/04/25 19:14:00 [error] 847#0: *57 FastCGI sent in stderr: "PHP message: PH>
Stack trace:
#0 /usr/local/hestia/web/fm/vendor/league/flysystem-sftp/src/SftpAdapter.php(20>
#1 /usr/local/hestia/web/fm/vendor/league/flysystem/src/Adapter/AbstractFtpAdap>
#2 /usr/local/hestia/web/fm/vendor/league/flysystem-sftp/src/SftpAdapter.php(36>
#3 /usr/local/hestia/web/fm/vendor/league/flysystem/src/Adapter/AbstractFtpAdap>
#4 /usr/local/hestia/web/fm/vendor/league/flysystem/src/Filesystem.php(272): Le>
#5 /usr/local/hestia/web/fm/backend/Services/Storage/Filesystem.php(199): Leagu>

Lines are not complete…


2023/04/25 19:14:00 [error] 847#0: *57 FastCGI sent in stderr: "PHP message: PHP Notice:  Invalid SFTP packet size in /usr/local/hestia/web/fm/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php on line 3704; PHP message: PHP Notice:  Expected SSH_FXP_VERSION in /usr/local/hestia/web/fm/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php on line 632; PHP message: PHP Fatal error:  Uncaught League\Flysystem\Sftp\InvalidRootException: Root is invalid or does not exist: / in /usr/local/hestia/web/fm/vendor/league/flysystem-sftp/src/SftpAdapter.php:279


Hi eris, does the last log I provided you give any solutions or ideas :frowning:

Is SFTP working on your server?

it is working. I have just connected to it using FileZilla: