Webfilebrowser run into error

Hello Again,

new month new problem :slight_smile: but I think its not that big:

After the total crash I hosted a new server, installed from scretch Ubuntu 22.04 and HestiaCP.

I set all settings and the username for admin exactly the same as the old one and restored the full backup from the old server.

  • All users where imported
  • All Webservices started fine
  • Mail and spam are working fine

But: If I try to access the Webfilebrowser I will get “Unknown error”. I checked the file system and saw that all /home// are owned by root but all permissions inside looking good like:

 ls -al test/
total 68
drwxr-x--x+ 14 root root 4096 Feb  7 08:35 .
drwxr-xr-x   7 root root 4096 Feb  7 08:35 ..
-rw-r--r--   1 test test  220 Jan  6  2022 .bash_logout
-rw-r--r--   1 test test 3771 Jan  6  2022 .bashrc
drwxr-xr-x   2 test test 4096 Feb  7 08:35 .cache
drwxr-xr-x   2 test test 4096 Feb  7 08:35 .composer
drwxr-xr-x   5 root root 4096 Feb  7 08:35 conf
drwxr-xr-x   2 test test 4096 Feb  7 08:35 .config
drwxr-xr-x   2 test test 4096 Feb  7 08:35 .local
drwxr-x--x   2 root root 4096 Feb  7 08:35 mail
drwxr-xr-x   2 test test 4096 Feb  7 08:35 .npm
-rw-r--r--   1 test test  807 Jan  6  2022 .profile
drwxr-xr-x   2 test test 4096 Feb  7 08:35 .ssh
drwx------   2 test test 4096 Feb  7 08:35 tmp
drwxr-xr-x   2 test test 4096 Feb  7 08:35 .vscode-server
drwxr-xr-x   2 root test 4096 Feb  7 08:35 web
drwxr-xr-x   2 test test 4096 Feb  7 08:35 .wp-cli

I tried to set the /home/ to the user like chown -R test:test /home/test because I though it would fix the problem but it doesnt and on each v-rebuild and new user the /home/ is back owned by root.

I dont need the web file browser of HestiaCP because FTP is working but I think there is an issue and I dont know if this issue will run into bigger problems anytimes.

Hi,

Try this:

sed -i -E 's/(^Sub.*internal-sftp)(.*)/\1/' /etc/ssh/sshd_config
systemctl restart ssh

Keep in mind that this only fixes the outcome but does not solve the underlying problem. It could happen again, so until a new Hestia version is released, you can patch the current installation:

cd /usr/local/hestia/bin/
mv v-add-sys-sftp-jail v-add-sys-sftp-jail.ori
curl -sSL https://raw.githubusercontent.com/hestiacp/hestiacp/b7b2f3b10cbfd5b727bb8cb835bc236bdfbc6660/bin/v-add-sys-sftp-jail -o v-add-sys-sftp-jail
chmod +x v-add-sys-sftp-jail

That was a bad move. You have messed up all the perms inside /home/test/ and that’s hard to fix.

1 Like

Hey thanks and sorry my post was not detailed enough, I did:

  • Create a new user on HestiaCP web panel
  • Compared the perms with my other HestiaCP server (which is running perfectly)
  • Saw the testuser dir was owning to the root
  • set chown testuser:testuser /home/testusser
  • Checked if its working: NOK
  • set chown -R testuser:testuser /home/testuser
  • Checked if its wokring: NOK
  • Did a v-rebuild
  • Checked if tis working: NOK
  • Checked perms: testuser was back owning to the root

And deleted the testuser.

Normally I always doing tests and checks with testuser instead of existing ones.

But I will try your fix, maybe it helps.

just to confirm, this is by design, the home folder is owned by root.

Thank you very much, in this case the v-rebuild and new user processes are working as expected and the web file browser error is an other behavior.

@sahsanu the fix doesn`t fix it. I think I will document this as an known error for my installation until it makes no troubles in other systems. I have no customers which are logging into the HestiaCP, I do all the stuff for them and I will mainly work via FTP. Honestly I just saw the error by checking if the white label logo is appearing after changing it xD