Hestia cp v1.9.2 - hestiaweb : a password is required ; PWD=/var/spool/cron ; USER=root ; COMMAND=/etc/init.d/clamav-daemon restart

After updating hestiacp to v1.9.2 i starts receiving emails below

my-server-link.dummy : Feb 6 12:00:01 : hestiaweb : a password is required ; PWD=/var/spool/cron ; USER=root ; COMMAND=/etc/init.d/clamav-daemon restart

my-server-link.dummy : Feb 7 02:10:08 : hestiaweb : a password is required ; PWD=/usr/local/hestia/web/fm/dist ; USER=root ; COMMAND=/usr/bin/chmod o+x /home/saadiftikhar/.ssh

my-server-link.dummy : Feb 7 02:11:13 : hestiaweb : a password is required ; PWD=/usr/local/hestia/web/fm/dist ; USER=root ; COMMAND=/usr/bin/chmod o+x /home//.ssh

i look like hestia is running under hestiaweb user and my commands are running under root user

how can i fix these?

Check if you have this file /etc/sudoers.d/hestiaweb

If that file doesn’t exist:

cp -f /usr/local/hestia/install/common/sudo/hestiaweb /etc/sudoers.d/

the file already exists

random_password="EnterHere a random string"
echo hestiaweb:$random_password | sudo chpasswd -e
1 Like

I have updated the password for the hestiaweb user. I will monitor the system for a day or two to determine whether I continue receiving emails.

Hi, i have monitored the server for 3 days and i am still receiving email.

thank you.

I have disabled the auto updates from UI but when i turned it on it does not turns on from the UI.
I tried to turn it on using cli
root@srv1 ~ # v-add-cron-hestia-autoupdate
it says
image

my root user is already super user.
just for testing i added sudo to the v-add-cron-hestia-autoupdate command it says
image

any help is appreciated thank you.

This is a known bug will be fixed in 1.9.3 was planning to do it for yesterday but ran out of time. Needed to go trough the docs for the last time

What is the contents of the file

/etc/sudoers.d/hestiaweb

I have the same problem:
myservor.mydomaine.com : Feb 11 07:30:01 : hestiaweb : a password is required ; PWD=/var/spool/cron ; USER=root ; COMMAND=/usr/local/sbin/mybaschscript.sh

cat /etc/sudoers.d/hestiaweb

Defaults:root !requiretty

# sudo is limited to hestia scripts
hestiaweb   ALL=NOPASSWD:/usr/local/hestia/bin/*

Regards

COMMAND=/usr/local/sbin/mybaschscript.sh

It is outside /usr/local/hestia/bin/ folder

So create the cron under the root user

Do you have a command to restart cron in /var/spool/cron/crontabs/hestiaweb

cat /var/spool/cron/crontabs/hestiaweb

MAILTO=""
CONTENT_TYPE="text/plain; charset=utf-8"
*/2 * * * * sudo /usr/local/hestia/bin/v-update-sys-queue restart
10 00 * * * sudo /usr/local/hestia/bin/v-update-sys-queue daily
15 02 * * * sudo /usr/local/hestia/bin/v-update-sys-queue disk
10 00 * * * sudo /usr/local/hestia/bin/v-update-sys-queue traffic
30 03 * * * sudo /usr/local/hestia/bin/v-update-sys-queue webstats
*/5 * * * * sudo /usr/local/hestia/bin/v-update-sys-queue backup
10 05 * * * sudo /usr/local/hestia/bin/v-backup-users
20 00 * * * sudo /usr/local/hestia/bin/v-update-user-stats
*/5 * * * * sudo /usr/local/hestia/bin/v-update-sys-rrd
13 4 * * * sudo /usr/local/hestia/bin/v-update-sys-hestia-all
*/5 * * * * sudo /usr/local/hestia/bin/v-update-sys-queue letsencrypt
51 7 * * * sudo /usr/local/hestia/bin/v-update-letsencrypt-ssl
30 7 * * * sudo -S /usr/local/sbin/mybaschscript.sh

Remove the last on /usr/local/sbin/mybaschscript.sh is outside the /usr/local/hestia/bin/ folder

Ok, the same script is launched two times a day. On time is ok as root:

crontab -l

0 6 * * * sudo /usr/local/sbin/backup-ftp-online.sh

At 6 o’clock, it works.

I have remove the other one at 7:30 ^^

Thanks.

Hestia web is limited to /usr/local/hestia/bin/ folder

This is what i have in the /etc/sudoers.d/hestiaweb

That is fine
cat /var/spool/cron/crontabs/hestiaweb

If it contains any commands outside the /usr/local/hestia/bin/ then it should be removed …

Yes i have clamav-daemon restart command in the cron file

Remove that and create one under the root user instead…

crontab -e

1 Like