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