I’m making a post about this because I ran into this today and I couldn’t remember how to rename a file starting with — (two or double hyphens) in Linux (e.g. –index.html). The customer has obviously used a Windows FTP client to rename index.html to –index.html so it is out of their way, and now [...]
#!/bin/bash # Shell Script To List All Top Hitting IP Address to your webserver. # This may be useful to catch spammers and scrappers. # ———————————————————————- # This script is licensed under GNU GPL version 2.0 or above # ———————————————————————- # where to store final report? DEST=/var/www/reports/ips # domain name DOM=$1 # log file location [...]
April 30th, 2012 |
admin |
These are some services I would normally turn off on web servers. NOTE: usage may vary. gpm — mouse mdmonitor — monitor raid devices netfs — nfs, samba etc… autofs — automount, nfs, cd etc… kudzu — detect new hardware restorecond — monitor selinux file context mcstrans — mandatory access control selinux translation There may [...]
April 22nd, 2012 |
admin |
Account Creation Status: failed (Your system has run out of available ip addresses, or you do not have permission to use any more ip addresses. (Unable to find an ip address.) ) You receive the “Account Creation Status: failed” error message while adding a domain from WHM >> Account Functions >> “Create a New Account” [...]
April 19th, 2012 |
admin |
How can I find all the file descriptors used by a process such as httpd (Apache web server) or mysqld (MySQL Database server)? You can use /proc file system or the lsof command to find all the file descriptors used by a process. /proc File System Example Find out process ID using the ps command, [...]
April 12th, 2012 |
admin |
#!/bin/bash # Shell to read source file and copy it to target file. If the file # is copied successfully then give message ‘File copied successfully’ # else give message ‘problem copying file’ # ————————————————————————- # Copyright (c) 2005 nixCraft project <http://cyberciti.biz/fb/> # This script is licensed under GNU GPL version 2.0 or above # [...]
April 10th, 2012 |
admin |
There was an error when you login Cpanel Can’t locate GDBM_File.pm in @INC (@INC contains: /usr/local/cpanel /usr/local/cpanel/perl /usr/local/cpanel/Cpanel/CPAN/overload/__Digest /usr/local/cpanel/build-tools/stubs /usr/lib/perl5/5.6.2/i686-linux /usr/lib/perl5/5.6.2 /usr/lib/perl5/site_perl/5.6.2/i686-linux /usr/lib/perl5/site_perl/5.6.2 /usr/lib/perl5/site_perl .) at /usr/local/cpanel/Cpanel/Locale/Utils.pm line 14. Cpanel::Locale::Utils::BEGIN() called at GDBM_File.pm line 14 eval {…} called at GDBM_File.pm line 14 require Cpanel/Locale/Utils.pm called at /usr/local/cpanel/Cpanel/Locale.pm line 15 Cpanel::Locale::BEGIN() called at GDBM_File.pm line 14 [...]
April 3rd, 2012 |
admin |
If you receive “virtual.db: No such file or directory” error message while adding a domain in Plesk control panel, you need to create the virtual.db file and place it in the proper location. The complete error message looks like: Failed domain creation: Unable to update domain data: mailmng failed: Fatal error: plesk::mail::postfix::PostfixConfigurationError(postmap:fatal:open database /var/spool/postfix/plesk/virtual.db: No [...]
March 31st, 2012 |
admin |
Q. How do I perform a case-insensitive search using sed under UNIX / Linux? I’d like to match all combination of word – foo, FOO, FoO and so on while replacing or performing other operations. A. GNU sed and other version does support a case-insensitive search using I flag after /regex/. UNIX / Linux: [...]
March 29th, 2012 |
admin |
The “hostname resolves to. It should resolve to xx.xx.xx.xx” alert is sent by cPanel if the hostname of your server is not resolving to your server IP. The message send by cPanel is as follows: IMPORTANT: Do not ignore this email. The hostname (server.domain.tld) resolves to . It should resolve to xx.xx.xx.xx. Please be sure [...]