Category Archives: Uncategorized

error: cpanel mail accounts not listed or mail accounts disappered in cpanel

Standard

Hosting customers should never delete or even manipulate the etc and mail directories in their home directories. If these directories, or any of their contents, are deleted or manipulated, it will break mail for the account.

 

https://forums.cpanel.net/f34/no-such-file-directory-home-givepoll-etc-givepolls-com-passwd-passwd-259332.html

 

nagios error: CHECK_NRPE: Socket timeout after 10 seconds

Standard

when we face this error in nagios and nagios shows server warning as LOAD then we need to try to connect the server having issue from nagios. If the below error we get we need to add 5666 port in csf.conf from the server with issue and also we need to restart csf.
CHECK_NRPE: Socket timeout after 10 seconds

you need to run the command from the nagios server to check if it can connect to server with issue.

/usr/local/nagios/libexec/check_nrpe -H  SERVERIP  -c check_load

 

mail filtering- > how to filter mails in webmail horde

Standard

You may follow the below steps to create the rule.

===========
select the filter options in webmail horde.
For an incoming message that matches:
select -> Any of the following
you can specify the sender or subject
under Do this: section select -> deliver to folder and trash
Mark message as: deleted
uncheck -> Stop checking if this rule matches?
Save the rule and select apply filters and finally save settings.
===========

 

yum update error : thread.error: can’t start new thread

Standard

This error is due to the inadequate memory for yum operation. This occurs due to Yum’s fastest-mirror plugin. So, if you have a low end VPS then you may see this error often. To solve this just disable that plugin.

You can disable this plugin in 2 ways :

Login using root issue and issue this command.

vi /etc/yum/pluginconf.d/fastestmirror.conf

And change this line
enable=1
to
enable=0

OR

Login using root issue and issue this command.

yum –disableplugin=fastestmirror update

This plugin is used to find the fastest mirrors/sources available for the software so that the update/install process is quicker. To re-enable the plugin, just run the command.

yum –enableplugin=fastestmirror update

OR

change enable=1 in fastestmirror.conf file

how to protect a directory using .htpasswd

Standard

Please move the directory to htdocs before protecting it with htpasswd
First you need to enter the details as below in httpd.conf and here backups is the dircetory u need to protect

<Directory “/usr/local/apache/htdocs/backups”>
Options Includes Indexes FollowSymLinks
AllowOverride All
</Directory>

 

then create the .htaccess file inside the backups directory located in /usr/local/apache/htdocs/backups and now set the entry for the .htaccess file as below

AuthName test
AuthType basic
AuthUserfile /usr/local/apache/htdocs/backups/.htpasswd
Require Valid-user test
save the file and type the command below to generate passowrd

/usr/local/apache/bin/htpasswd -cm /usr/local/apache/htdocs/backups/.htpasswd test

now cal the directory by serverip/backups and supply the username and passwd as test and the passwd u set by the command above

do apache configtest and restart

require_files: error for /usr/local/cpanel/3rdparty/mailman/lists/test5_xxx.net/config.pck: Permission denied

Standard

If you face the below error with mailman you can try the below fix

/scripts/fixmailman

Also you can login to  WHM > tweak settings and Enable/disable mailman there.

ps -ax|grep mailman

Run following command on shell to start/stop mailnam service on cPanel server.

/usr/local/cpanel/3rdparty/mailman/bin/mailmanctl start

/usr/local/cpanel/3rdparty/mailman/bin/mailmanctl stop

whitelisting modsecurity for an entire domain

Standard

Just create a directory:

mkdir -p /usr/local/apache/conf/userdata/std/2/username/domain.com

Then create a file:

/usr/local/apache/conf/userdata/std/2/username/domain.com/mod_security.conf

In that file add:

<IfModule mod_security.c>
SecRuleEngine Off
</IfModule>

Save it.

Then run:

/scripts/ensure_vhost_includes –user=username

 

OR

you can also try to whitelist the modsecurity for the entire domain by adding the below rule in  modsec_nice_rules.conf.

SecRule SERVER_NAME “domain.com” phase:1,nolog,allow,ctl:ruleEngine=off

in the above rule replace domainname with your domain name

 

restart apache after adding the rule.