File manager: Unknow error

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:

Hi eris, any news :frowning:

You did try to login with the user you try to use the filemanger?

Also:

or

I logged in to FileZilla with my VPS IP address and password. Maybe that wasn’t right tho? I will be looking at the article you give me. Thanks and sorry because I’m not a programmer. I’m learning HestiaCP tho.

With the same user as you try with the filemanger?

No, it isn’t. My IP and password are the root user that can manage the VPS entirely.
The user that I’m trying to access the file manager is the Hestia admin account.

So I suppose I should grant permission for the user Admin Hestia right?

Anyways, the permission of the ssh_config is: -rw-r–r-- 1 root root 3379 Mar 19 16:41

But again, it’s the root user

No current setting should be fine. How ever make sure you are able to login with it…

When I try to connect to my server (IP address/ port 22) using FileZilla with the Hestia Admin account. It says:

Error: FATAL ERROR: Received unexpected end-of-file from SFTP server
Error: Could not connect to server

Can you tell me what’s the problem and how to fix it?
I changed nothing in HestiaCP since the last time I access the file manager

Check /var/log/auth.log

Here it is. Please have a look.

I believe the problem is in this line:

Apr 27 09:24:39 hcp sshd[670283]: subsystem request for sftp by user nguyendang failed, subsystem not found

But how do I fix that? @eris

I fixed that with a little help from ChatGPT

I added this line to my ssh config file:

Subsystem sftp /usr/lib/openssh/sftp-server

Does that pose any security threat @eris

Default should be

Subsystem sftp internal-sftp

1 Like

Thanks @eris . Problem solved now

1 Like

You need in sshd_config line : (debian/ubuntu)

nano /etc/ssh/sshd_config
AllowUsers user1 user2 admin

(user1 . change for real user etc, other users via ssh permit, this config) and restart service:

systemctl restart sshd

Enjoy