The below code will help you to find the JSP, tomcat and servlet versions installed in your server or domain.
Working with server: <%= application.getServerInfo() %><br>
Servlet Specification: <%= application.getMajorVersion() %>.<%= application.getMinorVersion() %> <br>
JSP version: <%= JspFactory.getDefaultFactory().getEngineInfo().get SpecificationVersion() %><br>
Create a test page checkjsp.jsp with above code in your domain. Check the test page by using browser “http://yourdomainname/checkjsp.jsp“. It will show the tomcat version, JSP and servlet version in your domain.
If you are unable to login into Webmail , and you are getting an Error: “Your Internet Address has changed since the beginning of your Mail session. To protect your security, you must login again.”
To fix this problem, you may do the following:
1)You can turn off ‘checkip’ feature in Horde server-wide.
2)Edit the /usr/share/psa-horde/config/conf.php file in the Plesk server and the change the following lines.
$conf[‘auth’][‘checkip’] = true;
$conf[‘auth’][‘checkip’] = false;
Please note that this modification cannot be configured per user basis and will affect all the webmail users in the server.
To change the password expiry time for a zimbra mail account, please follow the steps below.
[zimbra@geo ~]$ zmprov ma email@example.com zimbraPasswordMaxAge 36500
This modifies the value. To see if the new value is set, use the command:
[zimbra@geo~]$ zmprov ga firstname.lastname@example.org zimbraPasswordMaxAge
# name email@example.com
This can also be done from admin panel, goto account >> edit >> advanced >> Maximum password age (Days).
I encountered the following error while restarting spamassassin.
Starting spamd: Feb 21 20:29:26.275  warn: Argument “” isn’t numeric in addition (+) at /usr/local/lib/perl5/site_perl/5.8.8/Mail/SpamAssassin/NetSet.pm line 122.
Feb 21 20:29:26.276  warn: oops! unparseable IPv6 address for 127/8: 168355856 at /usr/local/lib/perl5/site_perl/5.8.8/Mail/SpamAssassin/NetSet.pm line 128.
Feb 21 20:29:26.276  warn: oops! unparseable IPv6 address for 127/8: 168356228 at /usr/local/lib/perl5/site_perl/5.8.8/Mail/SpamAssassin/NetSet.pm line 128.
child process  exited or timed out without signaling production of a PID file: exit 255 at /usr/bin/spamd line 2582.
The work around I found is to change cpanel to stable version and run upcp.
then do this,
sa-learn -D –force-expire
This should fix the issue.
I found out that klipper is not working well in Ubuntu 11.10 version. I installed glipper in my machine and after a reboot, met with this error.
glipper crashed with ValueError in load(): invalid literal for int() with base 10: “\xcb#W\x84\xb0\x0e […] \r”
The workaround appears to be to just forget about the invalid history file (or move it away):
$ rm ~/.local/share/glipper/history
geo@ubuntu:~$ ll .local/share/glipper/history
-rw-rw-r– 1 geo geo 27041 2012-02-16 10:28 .local/share/glipper/history
geo@ubuntu:~$ rm -f .local/share/glipper/history
geo@ubuntu:~$ glipper &
geo@ubuntu:~$ SHARED_DATA_DIR: /usr/share/glipper
Binding shortcut c to popup glipper
Changed process name to: glipper
Glipper started working again…
Sometimes we need to find larger files in a file system when theres is a disk space issue.
This example finds all the files under /etc directory which are larger than 1000k:
geobaby@ubuntu:~$ find /etc -size +1000k
If you look at the file, the size if above 1000k:
geobaby@ubuntu:~$ ls -l /etc/brltty/zh-tw.ctb
-rw-r–r– 1 root root 1368836 2010-08-12 05:20 /etc/brltty/zh-tw.ctb
The following example will be helpful in cPanel or web servers.
find / -size +1000M : will list all the files above 1GB size.
find / -size +1000M > list
for i in `cat list`; do du -sch $i;done : will list all the files and their resoective size.
While logging into plesk panel, you may have encountered the following error.
“Access for administrator from address xx.xx.xx.xx is restricted in accordance with IP Access restriction policy currently applied.”
It means that Plesk IP access policy was configured in such a way that Plesk panel cannot be accessed from the current IP address. To enable Plesk CP access one needs to login to Plesk Control Panel locally and change IP access policy. It can be done the following way.
Retrieve the current policy and restricted/allowed IPs the following commands from shell.
$ mysql -u admin -p`cat /etc/psa/.psa.shadow`
mysql> use psa;
mysql> select * from cp_access;
mysql> select * from misc where param=’access_policy’;
Clear the access policy settings from the “cp_access” table and set policy to “allow” using commands,
mysql> delete * from cp_access;
mysql> update misc set val=”allow” where param=’access_policy’;
After exiting from mysql prompt you should be able to access the admin panel.
This could be implemented using both FUSE and SSHFS.
Download both from http://fuse.sourceforge.net/sshfs.html
1. Install FUSE
Extract and install
#tar xvf fuse-x.tar.gz
After successful installation, install SSHFS
Extract and install
#tar xvf sshfs-fuse-x.tar.gz
Now we can use sshfs to mount sftp share. Before mounting, create mount point where the share to be mounted.
Mount command: sshfs <username>@<sftpserver IP/host>:/<sftp_share_path> /<mountpoint>
#sshfs firstname.lastname@example.org:/home/testuser /mnt/sftpshare/
This will prompt for password if user configured any password.
NOTE: If you want to avoid prompting for password,then you should configure key based ssh login between these servers.
Verify the mounted partition using df command.
To mount this share directory in boot time, add the following entry in /etc/fstab
email@example.com:/home/testuser /mnt/sftpshare fuse defaults 0 0
NOTE: For unmounting this partition,we can use fusermount command as below
#fusermount -u /mnt/sftpshare/
cPHulk Brute Force Protection prevents malicious forces from trying to access your server’s services by guessing the login password for that
By the following steps you can remove the IP from the cphulkd blacklist. Issue the commands from mysql prompt.
mysql> use cphulkd;
mysql> select * from brutes;
| IP | NOTES | BRUTETIME | EXPTIME |
| 184.108.40.206 | 5 login failures attempts to account firstname.lastname@example.org (ftp) | 2011-01-07 14:54:02 | 2011-01-07 14:59:02 |
1 row in set (0.00 sec)
mysql> delete from brutes where IP=’220.127.116.11′;
Query OK, 1 row affected (0.00 sec)
You are done.
Often you have encountered problems while importing large databases via phpmyadmin. In that case, you can dump the mysql tables by using the following command.
for T in `mysql -N -B -e ‘show tables from database_name’`; do echo $T; mysqldump database_name $T > database_name_$T.gz ; done
Now you can restore the tables one by one through phpmyadmin.