hestiacp / hestiacp

Hestia Control Panel | A lightweight and powerful control panel for the modern web.
https://hestiacp.com
GNU General Public License v3.0
3.4k stars 680 forks source link

Installation doubt #2696

Closed erikperin closed 2 years ago

erikperin commented 2 years ago

Describe the doubt

I have some error after fresh install

PHP Notice: Unable able to load required libaries. Please run v-add-sys-phpmailer in command line in /usr/local/hestia/web/inc/main.php on line 11 Unable able to load required libaries. Please run v-add-sys-phpmailer in command line

and when I'll access the dashboard panel, returns Unable able to load required libaries. Please run v-add-sys-phpmailer in command line

Tell us how to replicate the bug

I just install and run the fresh installation

Which components are affected by this bug?

Control Panel Command Line Interface, Control Panel Web Interface

Hestia Control Panel Version

1.6.0

Operating system

Debian 11

Log capture

* ] Installing remaining software updates...
[ * ] Updating configuration files...

====================================================================

PHP Notice:  Unable able to load required libaries. Please run v-add-sys-phpmailer in command line in /usr/local/hestia/web/inc/main.php on line 11
Unable able to load required libaries. Please run v-add-sys-phpmailer in command line
Congratulations!

You have successfully installed Hestia Control Panel on your server.

Ready to get started? Log in using the following credentials:
jaapmarcus commented 2 years ago

It should install over here:

https://github.com/hestiacp/hestiacp/blob/62d7a82830295e418b5602e64e8470a1e95b4f10/install/hst-install-ubuntu.sh#L1946-L1949

or

https://github.com/hestiacp/hestiacp/blob/62d7a82830295e418b5602e64e8470a1e95b4f10/install/hst-install-debian.sh#L1860-L1865

Please check the full logs

erikperin commented 2 years ago

now returns that

Error: Path outside of user homedir (Composer dir)

jaapmarcus commented 2 years ago

Does the admin user exists?

https://github.com/hestiacp/hestiacp/blob/main/bin/v-add-sys-phpmailer

https://github.com/hestiacp/hestiacp/blob/62d7a82830295e418b5602e64e8470a1e95b4f10/bin/v-add-user-composer#L57

erikperin commented 2 years ago

"Does the admin user exists?" YES, after installiing

jaapmarcus commented 2 years ago

Run: echo $(readlink -m "/home/admin/.composer" | egrep "^/home/admin/")

in cli

erikperin commented 2 years ago

Same,

root@server:/home/admin# v-add-sys-phpmailer Error: Path outside of user homedir (Composer dir)

jaapmarcus commented 2 years ago

echo $(readlink -m "/home/admin/.composer" | egrep "^/home/admin/")

This is the check that fails it on...

erikperin commented 2 years ago
root@server:/home/admin/web# echo $(readlink -m "/home/admin/.composer" | egrep "^/home/admin/")

root@server:/home/admin/web# 
jaapmarcus commented 2 years ago

What returns: readlink -m "/home/admin/.composer"

?

On my server it should return: readlink -m "/home/admin/.composer" /home/admin/.composer

erikperin commented 2 years ago

/mnt/armazenamento/home/admin/.composer

jaapmarcus commented 2 years ago

That would explain why it fails..

Has it been symlinked?

Mount the storage with

mkdir /home/ mount --bind /mnt/armazenamento/home/ /home/

And it should work as expected during install

See for an /example: https://docs.hestiacp.com/admin_docs/backups.html#how-to-change-default-backup-folder

jaapmarcus commented 2 years ago

As it is not an bug I will close the issue

jlguerrerosanz commented 2 years ago

It is not a bug but maybe hestia could throw an error to avoid the guesswork

erikperin commented 2 years ago

I used to do the same thing with VestaCP and other CPs, and it always worked... but I'll try to do it anyway.

ScIT-Raphael commented 2 years ago

We're not vesta or other cps, there are some limitations due to security, if you follow the mount --bind example it should work. I'm not sure if a warning is worth it, I never noticed such a mount "use case" since a few years.

erikperin commented 2 years ago

See for an /example: https://docs.hestiacp.com/admin_docs/backups.html#how-to-change-default-backup-folder

But it doesn't take up space on your system drive? Because the link (mnt/armazenamento/home/) is on an external drive

jaapmarcus commented 2 years ago

See for an /example: https://docs.hestiacp.com/admin_docs/backups.html#how-to-change-default-backup-folder

But it doesn't take up space on your system drive? Because the link (mnt/armazenamento/home/) is on an external drive

You can mount the /home/ dir directly to external drive if you need.

jlguerrerosanz commented 2 years ago

I have successfully moved some users to /home2 mounted in a different disk with links and it works well with email servers. Didn't try it with website hosting though.

erikperin commented 2 years ago

WOW! Thats works now!

Really thank you very much!

Keep up the beautiful work you've been doing. Really saved me. Thank you again.

jaapmarcus commented 2 years ago

I have successfully moved some users to /home2 mounted in a different disk with links and it works well with email servers. Didn't try it with website hosting though.

https://github.com/hestiacp/hestiacp/blob/570b5dd5bcdc1ad6c8606a29ffe96a7457c9ff40/bin/v-add-web-domain#L76-L77

In the past Users could "already" create an folder point it to /private_folder/ and it would chown to the that user ... It is not a great idea ...