<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linux Servers cPanel webhosting blog &#187; Server Security</title>
	<atom:link href="http://www.theperfectarts.com/category/server-security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.theperfectarts.com</link>
	<description>Basics cPanel tutorials / issue,mysql,php errors etc</description>
	<lastBuildDate>Sun, 11 Jul 2010 23:05:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to disable root login and enable key authentication on Dedicated server?</title>
		<link>http://www.theperfectarts.com/2010/07/how-to-disable-root-login-and-enable-key-authentication-on-dedicated-server/</link>
		<comments>http://www.theperfectarts.com/2010/07/how-to-disable-root-login-and-enable-key-authentication-on-dedicated-server/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 23:00:12 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[Basic Linux]]></category>
		<category><![CDATA[Linux Administrator Interview Questions]]></category>
		<category><![CDATA[Server Security]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[/etc/ssh/sshd_config]]></category>
		<category><![CDATA[chmod comamnd]]></category>
		<category><![CDATA[disable root login]]></category>
		<category><![CDATA[enable key authentication]]></category>
		<category><![CDATA[generate the key]]></category>
		<category><![CDATA[mkdir command]]></category>
		<category><![CDATA[ppk file]]></category>
		<category><![CDATA[PuTTYgen software]]></category>
		<category><![CDATA[security on dedicated server]]></category>
		<category><![CDATA[ssh file]]></category>
		<category><![CDATA[ssh Protocol]]></category>
		<category><![CDATA[sshd restart]]></category>
		<category><![CDATA[sudoers file]]></category>
		<category><![CDATA[useradd command]]></category>
		<category><![CDATA[usermod coammnd]]></category>
		<category><![CDATA[which command]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=1089</guid>
		<description><![CDATA[How to disable root login and enable key authentication on Dedicated server? Refer following steps to disable direct root login. 1. SSH into your server as root user. 2. Open file sshd_config in your favorite editor pico /etc/ssh/sshd_config 3. Find the line Protocol 2, 1 4. Uncomment line and change it to look like Protocol [...]]]></description>
			<content:encoded><![CDATA[<p>How to disable root login and enable key authentication on Dedicated server?</p>
<p>Refer following steps to disable direct root login.</p>
<p>1. SSH into your server as root user.</p>
<p>2. Open file sshd_config in your favorite editor</p>
<p><strong>pico /etc/ssh/sshd_config</strong></p>
<p>3. Find the line</p>
<p><strong>Protocol 2, 1</strong></p>
<p>4. Uncomment line and change it to look like</p>
<p><strong>Protocol 2</strong></p>
<p>5. Now find the line<br />
<strong>PermitRootLogin yes</strong></p>
<p>6. And Uncomment libe and make it look like as<br />
<strong>PermitRootLogin no</strong></p>
<p>7. Save the file sshd_config file,</p>
<p>8. Restart SSH service<br />
<strong>/etc/rc.d/init.d/sshd restart</strong></p>
<p>Once root login disabled on server generate authentication key by using following steps.</p>
<p>1. Add user for example we will add user support</p>
<p><strong>useradd support</strong></p>
<p>2.Assigne user support in wheel group.</p>
<p><strong>usermod -G wheel support</strong></p>
<p>3. Set correct permission for sudoers files.</p>
<p><strong>chmod 644 /etc/sudoers</strong></p>
<p>4. Now open sudoers file and set followings line in sudoers file.</p>
<p><strong>pico /etc/sudoers</strong></p>
<p># User privilege specification<br />
<strong>root    ALL=(ALL) ALL</strong></p>
<p># Same thing without a password<br />
<strong>%wheel        ALL=(ALL)       NOPASSWD: ALL</strong></p>
<p>5. Make sure that sudo file binery file is secure.</p>
<p><strong>chmod 4111 /usr/bin/sudo</strong></p>
<p>If you are not sure about sudo binery path then run commamd to confirm the path.</p>
<p><strong>which sudo</strong></p>
<p>6.Now create .ssh directory in support users home directory.</p>
<p><strong>cd /home/support</strong></p>
<p><strong>mkdir .ssh</strong></p>
<p>7. Now generate the key by using <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html">PuTTYgen software </a>and save the key on your local machine as support.ppk file.</p>
<p>8. Create authorized_keys file in .ssh directory and copy content from file support.ppk to authorized_keys file.</p>
<p>9. Confirm permission and ownership for files.</p>
<p><strong>cd /home</strong></p>
<p><strong>ll | grep support</strong></p>
<p>The ownership shuold be</p>
<blockquote><p><strong>drwx&#8212;&#8212;    7 support support          4096 Jul 10 03:44 support</strong></p></blockquote>
<p><strong>cd /home/support</strong></p>
<p><strong>ll | grep .ssh</strong></p>
<blockquote><p><strong>drwxr-xr-x    2 root   root        4096 Jul 12  3:34 .ssh/</strong></p></blockquote>
<p><strong>ll .ssh</strong></p>
<p>The ownership shoud be</p>
<blockquote><p><strong>drwxr-xr-x 2 root    root    4096 Jul 12 03:22 ./<br />
drwx&#8212;&#8212; 7 support support 4096 Jul 12 03:44 ../<br />
-rw-r&#8211;r&#8211; 1 root    root    224  Jul 12 03:40 authorized_keys</strong></p></blockquote>
<p><strong>Note : Do not close current Shell until you are able to access server with the support.ppk key.</strong></p>
<p>&copy;2010 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2010/07/how-to-disable-root-login-and-enable-key-authentication-on-dedicated-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SuExec server permission issue?</title>
		<link>http://www.theperfectarts.com/2010/07/suexec-server-permission-issue/</link>
		<comments>http://www.theperfectarts.com/2010/07/suexec-server-permission-issue/#comments</comments>
		<pubDate>Sat, 03 Jul 2010 21:56:09 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[Common errors]]></category>
		<category><![CDATA[Linux Permissions]]></category>
		<category><![CDATA[Server Security]]></category>
		<category><![CDATA[500 Internal Server Error]]></category>
		<category><![CDATA[files directories ownership]]></category>
		<category><![CDATA[SuExec server permission issue]]></category>
		<category><![CDATA[trueuserdomains]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=1077</guid>
		<description><![CDATA[After enabling SuExec on server most users getting &#8220;500 Internal Server Error&#8221; at that time refer following steps. 1st)  Correct cPanel users files/directories ownership. —— for i  in `cat /etc/trueuserdomains   &#124; awk ‘{print $2}’` do chown $i.$i /home/$i -R; chown $i.mail /home/$i/etc -R; chown $i.nobody /home/$i/public_html; done; —– 2nd) Correct permission for files and directories [...]]]></description>
			<content:encoded><![CDATA[<p>After enabling SuExec on server most users getting &#8220;500 Internal Server Error&#8221; at that time refer following steps.</p>
<p>1st)  Correct cPanel users files/directories ownership.</p>
<p>——</p>
<p><strong>for i  in `cat /etc/trueuserdomains   | awk ‘{print $2}’`<br />
do<br />
chown $i.$i /home/$i -R;<br />
chown $i.mail /home/$i/etc -R;<br />
chown $i.nobody /home/$i/public_html;<br />
done;</strong></p>
<p>—–</p>
<p>2nd) Correct permission for files and directories for cPanel users from shell but make sure that you logged in as root user and running following command in /home partition.</p>
<p><strong>—–</strong></p>
<p><strong>find . -type d  -perm 777 -exec chmod 755 {} \;</strong></p>
<p><strong>find . -type  f  -perm 777 -exec chmod 755 {} \;</strong></p>
<p><strong>—–</strong></p>
<p>&copy;2010 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2010/07/suexec-server-permission-issue/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>&#8220;unauthenticated user&#8221; problem in mysql logs?</title>
		<link>http://www.theperfectarts.com/2010/06/unauthenticated-user-problem-in-mysql-logs/</link>
		<comments>http://www.theperfectarts.com/2010/06/unauthenticated-user-problem-in-mysql-logs/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 19:54:11 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[Linux Administrator Interview Questions]]></category>
		<category><![CDATA[Mysql + phpmyadmin]]></category>
		<category><![CDATA[Server Security]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[disable remote mysql acces. /etc/my.cnf]]></category>
		<category><![CDATA[skip-host-cache]]></category>
		<category><![CDATA[skip-locking]]></category>
		<category><![CDATA[skip-name-resolve]]></category>
		<category><![CDATA[skip-networking]]></category>
		<category><![CDATA[unauthenticated user]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=1074</guid>
		<description><![CDATA[While running following command. mysqladmin -i3 pr We are getting result. 056 &#124; unauthenticated user &#124; localhost &#124;    &#124; Connect &#124;      &#124; Reading from net &#124; To avoid such problem add following lines in /etc/my.cnf file to avoid access for unauthenticated user. root@server [~]# pico /etc/my.cnf skip-networking skip-name-resolve skip-host-cache skip-locking Now restart the mysql service [...]]]></description>
			<content:encoded><![CDATA[<p>While running following command.</p>
<blockquote><p>mysqladmin -i3 pr</p></blockquote>
<p>We are getting result.</p>
<blockquote><p>056 | unauthenticated user | localhost |    | Connect |      | Reading from net |</p></blockquote>
<p>To avoid such problem add following lines in /etc/my.cnf file to avoid access for unauthenticated user.</p>
<blockquote><p>root@server [~]# pico /etc/my.cnf</p></blockquote>
<blockquote><p>skip-networking<br />
skip-name-resolve<br />
skip-host-cache<br />
skip-locking</p></blockquote>
<p>Now restart the mysql service and check mysql process logs again.</p>
<blockquote>
<blockquote></blockquote>
</blockquote>
<p>&copy;2010 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2010/06/unauthenticated-user-problem-in-mysql-logs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Secure server from WHM?</title>
		<link>http://www.theperfectarts.com/2010/06/secure-server-from-whm/</link>
		<comments>http://www.theperfectarts.com/2010/06/secure-server-from-whm/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 10:16:02 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[Linux Administrator Interview Questions]]></category>
		<category><![CDATA[Server Security]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[Analog]]></category>
		<category><![CDATA[Awstats from cPanel]]></category>
		<category><![CDATA[FormMail-clon]]></category>
		<category><![CDATA[jailshell]]></category>
		<category><![CDATA[open_basedir Protection Spamassasssin]]></category>
		<category><![CDATA[Secur server frOM WHM]]></category>
		<category><![CDATA[SMTP Tweak]]></category>
		<category><![CDATA[twek settings]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=1055</guid>
		<description><![CDATA[We can secure Server from WHM by making following changes from WHM. Tweak Settings : Number (or all) of accounts to display per page in list accounts == 30 Disable : Allow users to park subdomains of the server&#8217;s hostname main domain Disable : Allow users to Park/Addon Domains on top of domains owned by [...]]]></description>
			<content:encoded><![CDATA[<p>We can secure Server from WHM by making following changes from WHM.</p>
<p>Tweak Settings :<br />
Number (or all) of accounts to display per page in list accounts == 30<br />
Disable : Allow users to park subdomains of the server&#8217;s hostname main domain<br />
Disable : Allow users to Park/Addon Domains on top of domains owned by other users.<br />
Disable : Allow users to Park/Addon Domains on top of domains owned by other users.<br />
Disable : Allow resellers to create accounts with subdomains of the server&#8217;s hostname main domain<br />
Disable : Allow Creation of Parked/Addon Domains that are not registered<br />
Disable : When adding a new domain, automatically create A entries for the registered nameservers if they would be contained in the zone<br />
Enable : Prevent users from parking/adding on common internet domain</p>
<p>Enable : Silently Discard all FormMail-clone requests with a bcc: header in the subject line<br />
Set Default Mail to FAIL.<br />
Disable : Track the origin of messages sent though the mail server by adding the X-Source headers.<br />
The maximum each domain can send out per hour = 300</p>
<p>Prevent the user &#8220;nobody&#8221; from sending out mail to remote addresses : Disable should enabled on server with phpsuexec.<br />
Disable : BoxTrapper Spam Trap<br />
Disable : Add the mail. prefix for mailman urls</p>
<p>Disable : Send passwords in plaintext over email when creating a new acccount</p>
<p>Disable : Awstats Reverse Dns Resolution<br />
Disable : Analog<br />
Disable : Allow users to update Awstats from cPanel<br />
Number of days between processing log files and bandwidth usage = 1<br />
Enable : Delete each domain&#8217;s access logs after stats run<br />
The load average above the number of cpus at which logs file processing should be suspended = 10<br />
Enable : Keep Stats Log between cPanel restarts</p>
<p>Disable : Allow Perl updates from RPM based linux vendors<br />
Enable : Use jailshell as the default shell for all new accounts and modified accounts<br />
Disable : Allow cPanel users to reset their password via email<br />
Enable : Spamassasssin</p>
<p>Tweak Security :<br />
Enable PHP open_basedir Protection.<br />
Enable mod_userdir Protection.<br />
Enable SMTP Tweak<br />
Disable Compilers for unprivileged users.</p>
<p>&copy;2010 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2010/06/secure-server-from-whm/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Install clamAV?</title>
		<link>http://www.theperfectarts.com/2010/05/install-clamav/</link>
		<comments>http://www.theperfectarts.com/2010/05/install-clamav/#comments</comments>
		<pubDate>Thu, 13 May 2010 18:24:45 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[Install server side software / script]]></category>
		<category><![CDATA[Server Security]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[calmv antivirus]]></category>
		<category><![CDATA[clamAV]]></category>
		<category><![CDATA[clamv scanner]]></category>
		<category><![CDATA[Install clamAV on cPanel server]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=1030</guid>
		<description><![CDATA[We can install clamAV by using following three options. First Download ClamAV from www.clamav.net in default locations under /usr/local/[bin,man,share] Run following from shell. root@server[]perl -MCPAN -e shell root@server[]install Parse::RecDescent root@server[]install Inline root@server[]install Mail::ClamAV Second option run /scripts/perlinstaller from shell root@server[]/scripts/perlinstaller Net::CIDR Archive::Zip Compress::Zlib Convert::BinHex Inline::C or root@server[]/scripts/perlinstaller Mail::ClamAV Third you can install ClamAV from WHM [...]]]></description>
			<content:encoded><![CDATA[<p>We can install clamAV by using following three options.</p>
<p>First Download ClamAV from www.clamav.net in default locations under /usr/local/[bin,man,share]<br />
Run following from shell.</p>
<blockquote><p>root@server[]perl -MCPAN -e shell<br />
root@server[]install Parse::RecDescent<br />
root@server[]install Inline<br />
root@server[]install Mail::ClamAV</p></blockquote>
<p>Second option run /scripts/perlinstaller from shell</p>
<blockquote><p>root@server[]/scripts/perlinstaller Net::CIDR Archive::Zip Compress::Zlib Convert::BinHex Inline::C<br />
or</p>
<p>root@server[]/scripts/perlinstaller Mail::ClamAV</p></blockquote>
<p>Third you can install ClamAV from WHM</p>
<blockquote><p>Select Main &gt;&gt; Software &gt;&gt; Install a Perl Module from WHM .</p>
<p>install perl module:-<br />
search for Mail::clamAV<br />
install it</p></blockquote>
<p>We can also enabled virus scanner feature to cPanel user from WHM &gt;&gt; Main &gt;&gt; cPanel <a href="http://92.48.124.6:2086/scripts/command?PFILE=cPanel"></a> &gt;&gt; Manage Plugins<a href="http://92.48.124.6:2086/scripts2/getthemes?modules=1"></a></p>
<p>Select  &#8220;Name: clamavconnector&#8221; from list and install it.</p>
<p>&copy;2010 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2010/05/install-clamav/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Basic of SuExec server?</title>
		<link>http://www.theperfectarts.com/2010/05/basic-of-suexec-server/</link>
		<comments>http://www.theperfectarts.com/2010/05/basic-of-suexec-server/#comments</comments>
		<pubDate>Wed, 12 May 2010 10:05:46 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[Linux Administrator Interview Questions]]></category>
		<category><![CDATA[Server Security]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[Advantages of SuExec]]></category>
		<category><![CDATA[Disdvantages of SuExecconfigure suexec]]></category>
		<category><![CDATA[SuExec server]]></category>
		<category><![CDATA[values of suexec server.]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=1022</guid>
		<description><![CDATA[What is SuExec? Apache SuExec is a feature of the Apache Web server. It allows users to run CGI and SSI applications as a different user. Normally, all web server processes run as the default web server user (often apache or nobody) Presently, suExec does not allow &#8216;root&#8217; user as well as &#8216;root&#8217; group to [...]]]></description>
			<content:encoded><![CDATA[<p><strong>What is SuExec?</strong></p>
<blockquote><p>
Apache SuExec is a feature of the Apache Web server. It allows users to run CGI and SSI applications as a different user. Normally, all web server processes run as the default web server user (often apache or nobody)</p>
<p>Presently, suExec does not allow &#8216;root&#8217; user as well as &#8216;root&#8217; group to execute CGI/SSI programs because SuExec is basically developed to run CGI and SSI based programs under the specific user ids other then common user name like nobody.</p></blockquote>
<blockquote><p>When PHP runs as an Apache module, PHP files work under the Apache user/group known as &#8220;nobody”. When a PHP script creates or uploads a new file under your account, the new file will be owned by the user &#8220;nobody&#8221;. If you FTP or cPanel into your account, all files owned by &#8220;nobody&#8221; will not be available for you to move, rename or delete. In this case the only way to remove the &#8220;nobody&#8221; owned files would be through a file on the shell by using root user.</p>
<p>When PHP runs as a CGI with Suexec, PHP files work under your user/group. PHP files no longer require loose permissions to function; now they will require strict permissions. Setting your directories or PHP files to 777 will cause them to produce a “500 Internal Server Error”, this happens to protect your PHP files from being abused by outside sources.</p></blockquote>
<p><strong></p>
<p>How to check SuExec configured value?</strong></p>
<blockquote><p>You can run suexec -V on server by using root login details. It will give you following result.</p>
<p> -D AP_DOC_ROOT=&#8221;/var/www&#8221;<br />
 -D AP_GID_MIN=100<br />
 -D AP_HTTPD_USER=&#8221;apache&#8221;<br />
 -D AP_LOG_EXEC=&#8221;/var/log/httpd/suexec.log&#8221;<br />
 -D AP_SAFE_PATH=&#8221;/usr/local/bin:/usr/bin:/bin&#8221;<br />
 -D AP_UID_MIN=500<br />
 -D AP_USERDIR_SUFFIX=&#8221;public_html&#8221;</p></blockquote>
<p><strong>By default following values are used while configuring SuExec.</strong></p>
<blockquote><p>&#8211;enable-suexec<br />
This option enables the suEXEC feature which is never installed or activated by default. At least one &#8211;suexec-xxxxx option has to be provided together with the &#8211;enable-suexec option to let APACI accept your request for using the suEXEC feature.</p>
<p>&#8211;with-suexec-docroot=DIR<br />
Define as the DocumentRoot set for Apache. This will be the only directory aside from UserDirs that can be used for SuExec behavior. The default directory is the &#8211;datadir value with the suffix &#8220;/htdocs&#8221;, e.g. if you configure with &#8220;&#8211;datadir=/var/www&#8221; the directory &#8220;/var/www/&#8221; is used as document root for the SuExec wrapper.</p>
<p>&#8211;with-suexec-caller=UID<br />
The username under which Apache normally runs. This is the only user allowed to execute this program.</p></blockquote>
<p><strong>SuExec-gidmin value?</strong></p>
<blockquote><p>&#8211;with-suexec-gidmin=GID</p>
<p>Define this as the lowest GID allowed to be a target group for SuExec. For most servers 100 are common and therefore used as default value. The numerical equivalent of the primary group name which is referenced by the system and applications when determining access privileges. When ever new user accounts are added, the new user accounts are assigned the first available UID and GID starting at 100. The next new user account is assigned UID/GID 101, followed by UID/GID 102, and so on. Because UIDs and GIDs below 100 are reserved for system uses Unlike UID/GID zero (0), UIDs and GIDs  below 100 are not treated specially by Server. However, these UIDs/GIDs are never to be assigned to a user, as it is likely that some system component either currently uses or will use these UIDs/GIDs at some point in the future.</p></blockquote>
<p><strong>SuExec-userdir and SuExec-bin?</strong></p>
<blockquote><p>&#8211;with-suexec-userdir=DIR</p>
<p>Define to be the subdirectory under users&#8217; home directories where SuExec access should be allowed. All executables under this directory will be executable by SuExec as the user so they should be &#8220;safe&#8221; programs. If you are using a &#8220;simple&#8221; UserDir directive this should be set to the same value. SuExec will not work properly in cases where the UserDir directive points to a location that is not the same as the user&#8217;s home directory as referenced in the passwd file. Default value is &#8220;public_html&#8221;.  If you have virtual hosts with a different UserDir for each, you will need to define them to all reside in one parent directory; then name that parent directory here. If this is not defined properly, &#8220;~userdir&#8221; cgi requests will not work!</p></blockquote>
<p><strong>Advantages of SuExec?</strong></p>
<blockquote><p>This allows processes to run as your own user, rather than the global web server user like nobody.<br />
The advantages are that any files created by your script are owned by your own user, and not a different (web server) user, allowing you to control, remove, add, and edit them via FTP, the control panel, File Manager, web page editor, SSH/shell,<br />
If any abuses, spam, attacks, illicit processes, etc. are easier and more immediately tracked and controlled by using SuExec log files.</p>
</blockquote>
<p><strong>Disadvantage of SuExec server?</strong></p>
<blockquote><p>Security risks involved with allowing users to develop and run private CGI or SSI programs. However, if SuExec is improperly configured, it can cause any number of problems and possibly create new holes in your server&#8217;s security<br />
Presently, suExec does not allow root or root group to execute CGI/SSI programs</p></blockquote>
<p>&copy;2010 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2010/05/basic-of-suexec-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to upgrade kernel version?</title>
		<link>http://www.theperfectarts.com/2010/05/how-to-upgrade-kernel-version/</link>
		<comments>http://www.theperfectarts.com/2010/05/how-to-upgrade-kernel-version/#comments</comments>
		<pubDate>Tue, 11 May 2010 11:24:08 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[Few good queries and suggestions]]></category>
		<category><![CDATA[Install server side software / script]]></category>
		<category><![CDATA[Linux Administrator Interview Questions]]></category>
		<category><![CDATA[Server Security]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[kerenel]]></category>
		<category><![CDATA[linux server kernel]]></category>
		<category><![CDATA[upgrade kernel on linux server]]></category>
		<category><![CDATA[upgrade kernel version]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=1015</guid>
		<description><![CDATA[First you need to download the latest stable kernel. You can check it at http://kernel.org/. Download it : root@server [~]# cd /usr/local/src/ root@server [~]# wget http://www.kernel.org/pub/linux/kernel/v2.6/ Select latest Kernel and download it root@server [~]# tar –zxvf linux-2.6.28.tar.gz root@server [~]#cd linux-2.6.28 root@server [~]# make clean root@server [~]# make mrproper root@server [~]# uname -r root@server [~] # [...]]]></description>
			<content:encoded><![CDATA[<p>First you need to download the latest stable kernel.<br />
You can check it at <a href="http://kernel.org/" target="_blank">http://kernel.org/</a>.<br />
Download  it :<br />
root@server [~]# cd /usr/local/src/</p>
<p>root@server [~]# wget http://www.kernel.org/pub/linux/kernel/v2.6/<br />
Select latest Kernel and download it</p>
<p>root@server [~]# tar –zxvf linux-2.6.28.tar.gz<br />
root@server [~]#cd linux-2.6.28<br />
root@server [~]# make clean<br />
root@server [~]# make mrproper<br />
root@server [~]# uname -r<br />
root@server [~] # cp /boot/config-&#8217;uname -r&#8217; .config<br />
root@server [~] # make oldconfig<br />
root@server [~] # make menuconfig<br />
root@server [~] # make<br />
root@server [~] # make modules_install<br />
root@server [~] # make install<br />
root@server [~] # grubby &#8211;bootloader-probe<br />
root@server [~] # pico /etc/grub.conf</p>
<p>Change the default as per the entry for your new kernel.<br />
root@server [~]#  reboot</p>
<p>Some time after reboot server it won&#8217;t up and running with the new kennel due to that before rebooting server, make following</p>
<p>changes.</p>
<p>root@server [~]#grub</p>
<p>Above command will give you grub prompt.</p>
<p>grub &gt; savedefault &#8211;default=0 &#8211;once</p>
<p>grub&gt;quit</p>
<p>root@server [~]#reboot</p>
<p>If server is up and running after reboot you can set new kernel as default server in grub.conf file.</p>
<p>root@server [~]#pico /boot/grub/grub.conf</p>
<p>Set</p>
<p>default=1</p>
<p>to</p>
<p>default=0</p>
<p>&copy;2010 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2010/05/how-to-upgrade-kernel-version/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to define iptables rules save option?</title>
		<link>http://www.theperfectarts.com/2010/01/how-to-define-iptables-rules-save-option/</link>
		<comments>http://www.theperfectarts.com/2010/01/how-to-define-iptables-rules-save-option/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 10:37:25 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[Basic Linux]]></category>
		<category><![CDATA[Linux Administrator Interview Questions]]></category>
		<category><![CDATA[Server Security]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[/etc/sysconfig/iptables]]></category>
		<category><![CDATA[iptables rule]]></category>
		<category><![CDATA[iptables save rules]]></category>
		<category><![CDATA[iptables-save]]></category>
		<category><![CDATA[iptables.iptables save]]></category>
		<category><![CDATA[IPTABLES_SAVE_COUNTER]]></category>
		<category><![CDATA[IPTABLES_SAVE_ON_RESTART]]></category>
		<category><![CDATA[IPTABLES_SAVE_ON_STOP]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=974</guid>
		<description><![CDATA[iptables creating rules after restarting the iptables. When iptables service is restarted settings from /etc/sysconfig/iptables file are applied and used with the iptables. You can either set up iptables rule so that current stat is saved the rule upon restart or stop/start: You need to make changes in following file as per your requirement for [...]]]></description>
			<content:encoded><![CDATA[<p>iptables creating rules after restarting the iptables. When iptables service is restarted settings from /etc/sysconfig/iptables file are applied and used with the iptables.</p>
<p>You can either set up iptables rule so that current stat is saved the rule upon restart or stop/start:</p>
<p>You need to make changes in following file as per your requirement for values received in following GREP result.</p>
<p><span style="color: #800000;">root@server[~]# grep IPTABLES_SAVE /etc/sysconfig/iptables-config<br />
IPTABLES_SAVE_ON_STOP=&#8221;no&#8221;<br />
IPTABLES_SAVE_ON_RESTART=&#8221;no&#8221;<br />
IPTABLES_SAVE_COUNTER=&#8221;no&#8221;</span></p>
<p>Or overwrite current settings with iptables-save to /etc/sysconfig/iptables file:</p>
<p><span style="color: #800000;">r</span><span style="color: #800000;">oot@server[~]# iptables-save &gt; /etc/sysconfig/iptables</span></p>
<p>Note : Its always good if we use NO option for following options because some time due to wrong rule we face major problem to access server.</p>
<p><span style="color: #800000;">IPTABLES_SAVE_ON_STOP=&#8221;no&#8221;<br />
IPTABLES_SAVE_ON_RESTART=&#8221;no&#8221;<br />
IPTABLES_SAVE_COUNTER=&#8221;no&#8221;<br />
</span></p>
<p><span style="color: #800000;"><br />
</span></p>
<p>&copy;2010 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2010/01/how-to-define-iptables-rules-save-option/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple steps for SSH Server Hardening.</title>
		<link>http://www.theperfectarts.com/2010/01/simple-steps-for-ssh-server-hardening/</link>
		<comments>http://www.theperfectarts.com/2010/01/simple-steps-for-ssh-server-hardening/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 10:12:48 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[Linux Administrator Interview Questions]]></category>
		<category><![CDATA[Server Security]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[/etc/ssh/sshd_config]]></category>
		<category><![CDATA[IgnoreRhosts]]></category>
		<category><![CDATA[LoginGraceTime]]></category>
		<category><![CDATA[restart the SSH service]]></category>
		<category><![CDATA[root kits attacks]]></category>
		<category><![CDATA[SSH Server Hardening]]></category>
		<category><![CDATA[sshd service]]></category>
		<category><![CDATA[X11Forwarding]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=972</guid>
		<description><![CDATA[SSH Server Hardening in one of the security part to secure your server.Refer following steps to secure SSH. root@serevr[~]#pico /etc/ssh/sshd_config Uncomment  #Protocol 2, 1 Change to Protocol 2 Append these lines to the bottom: LoginGraceTime 120 IgnoreRhosts yes X11Forwarding no Save file and restart the SSH service. root@serevr[~]#/etc/rc.d/init.d/sshd restart Note : SSH Protocol one  based [...]]]></description>
			<content:encoded><![CDATA[<p>SSH Server Hardening in one of the security part to secure your server.Refer following steps to secure SSH.</p>
<p><span style="color: #800000;">root@serevr[~]#pico /etc/ssh/sshd_config</span></p>
<p>Uncomment  #Protocol 2, 1</p>
<p>Change to Protocol 2</p>
<p>Append these lines to the bottom:</p>
<p>LoginGraceTime 120<br />
IgnoreRhosts yes<br />
X11Forwarding no<br />
Save file and restart the SSH service.</p>
<p><span style="color: #800000;">root@serevr[~]#/etc/rc.d/init.d/sshd restart</span></p>
<p><span style="color: #800000;">Note : </span>SSH Protocol one  based servers are  facing many automated root kits attacks.As a result to step up the security Protcol 2 should be enabled on server.The reason to use SSH Protocol 2 on any webserver is that it is more secure as compare to protocol 1.</p>
<p>&copy;2010 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2010/01/simple-steps-for-ssh-server-hardening/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Disable directory listing for folders by using .htaccess?</title>
		<link>http://www.theperfectarts.com/2009/11/disable-directory-listing-for-folders-by-using-htaccess/</link>
		<comments>http://www.theperfectarts.com/2009/11/disable-directory-listing-for-folders-by-using-htaccess/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 22:45:45 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[Linux Administrator Interview Questions]]></category>
		<category><![CDATA[Server Security]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[Directory listing with .htaccess]]></category>
		<category><![CDATA[Disable directory listing]]></category>
		<category><![CDATA[htaccess code to disable directory listing]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=468</guid>
		<description><![CDATA[To disable the Directory listing for folders you need to create the .htaccess file under the each an every folder under which you want to disable the Directory listing and insert the following code in .htaccess file. &#8212;&#8212;&#8212;&#8212; Options -Indexes &#8212;&#8212;&#8212;&#8212;- &#169;2010 Linux Servers cPanel webhosting blog. All Rights Reserved..]]></description>
			<content:encoded><![CDATA[<p>To disable the Directory listing for folders you need to create the .htaccess file under the each an every folder under which you want to disable the Directory listing and insert the following code in .htaccess file.</p>
<p>&#8212;&#8212;&#8212;&#8212;<br />
Options -Indexes<br />
&#8212;&#8212;&#8212;&#8212;-</p>
<p>&copy;2010 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2009/11/disable-directory-listing-for-folders-by-using-htaccess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
