<?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>linuxbuddies.com &#187; Riyesh</title>
	<atom:link href="http://linuxbuddies.com/author/Riyesh/feed/" rel="self" type="application/rss+xml" />
	<link>http://linuxbuddies.com</link>
	<description>For linux documentations.</description>
	<lastBuildDate>Fri, 11 Sep 2009 10:11:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Prevent image hotlinking</title>
		<link>http://linuxbuddies.com/2009/01/20/prevent-image-hotlinking/</link>
		<comments>http://linuxbuddies.com/2009/01/20/prevent-image-hotlinking/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 19:18:26 +0000</pubDate>
		<dc:creator>Riyesh</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[server tweak]]></category>
		<category><![CDATA[hotlinkingm preventing image theft]]></category>

		<guid isPermaLink="false">http://linuxbuddies.com/?p=313</guid>
		<description><![CDATA[Hotlinking is the use of a linked object, often an image, from one site into a web page belonging to a second site. The second site is said to have an inline link to the site where the object is located.
It is always recommended to enable hotlinking of images, else ...]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-thumbnail wp-image-314" title="hotlinking" src="http://linuxbuddies.com/wp-content/uploads/2009/01/hotlinking-150x150.jpg" alt="hotlinking" width="150" height="150" />Hotlinking is the use of a linked object, often an image, from one site into a web page belonging to a second site. The second site is said to have an inline link to the site where the object is located.<br />
It is always recommended to enable hotlinking of images, else others use just links to your site to load their web-pages, thereby stealing your bandwidth. Do you want that to happen?</p>
<p>If not, copy-paste the below code to your websites .htaccess file.</p>
<p style="padding-left: 30px;">RewriteCond %{HTTP_REFERER} !^$<br />
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com/.*$ [NC]<br />
RewriteRule ^.*\.(bmp|tif|gif|jpg|jpeg|jpe|png)$ &#8211; [F]</p>
<p style="padding-left: 30px;">
<p style="padding-left: 30px;">Haii.. Linux buddy,, you now. safe&#8230;.  :D</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxbuddies.com/2009/01/20/prevent-image-hotlinking/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>kernel compilation</title>
		<link>http://linuxbuddies.com/2009/01/20/kernel-compilation/</link>
		<comments>http://linuxbuddies.com/2009/01/20/kernel-compilation/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 19:10:44 +0000</pubDate>
		<dc:creator>Riyesh</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[server tweak]]></category>
		<category><![CDATA[compilation]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[kernel compilation]]></category>
		<category><![CDATA[updating]]></category>

		<guid isPermaLink="false">http://linuxbuddies.com/?p=307</guid>
		<description><![CDATA[Kernel 
 It makes sure that all processes in the system works fine
Rebuilding

It is done to optimize the kernel to suit our requirements as well as make it more secure from internet attacks
 Steps

1. Determining the current hardware 
 This is required during configuration process to enable hardwares that our new kernel has to support.
Commands ...]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-thumbnail wp-image-309" title="kernel" src="http://linuxbuddies.com/wp-content/uploads/2009/01/kernel-150x150.gif" alt="kernel" width="150" height="150" /><strong>Kernel </strong></p>
<p><strong><span style="font-weight: normal;"> It makes sure that all processes in the system works fine</span></strong></p>
<p><strong><span style="font-weight: normal;"><span>Rebuilding</span><br />
</span></strong></p>
<p><strong><span style="font-weight: normal;">It is done to optimize the kernel to suit our requirements as well as make it more secure from internet attacks</span></strong></p>
<p><span><strong> Steps</strong></span></p>
<p><span><strong></strong></span><br />
<span>1. Determining the current hardware </span><br />
 This is required during configuration process to enable hardwares that our new kernel has to support.<br />
Commands used for the same are:</p>
<p> </p>
<p> </p>
<div class="codetitle" style="padding-left: 30px; "><strong><br />
</strong></div>
<div class="codecontent" style="padding-left: 30px; ">/sbin/lspci </div>
<div class="codecontent" style="padding-left: 30px; ">cat /proc/cpuinfo</div>
<div class="codecontent" style="padding-left: 30px; "></div>
<p><span>2. Download the Source</span><br />
latest sources and its corresponding patches are always available from<a class="postlink" href="http://www.kernel.org/pub/linux/kernel/">http://www.kernel.org/pub/linux/kernel/</a><br />
 As of today (Oct 21, 2008) the latest available source is <a class="postlink" href="http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.27.2.tar.gz">linux-2.6.27.2.tar.gz</a> and the patch is <a class="postlink" href="http://www.kernel.org/pub/linux/kernel/v2.6/patch-2.6.27.2.gz">patch-2.6.27.2.gz</a></p>
<p><span>Apply the patches</span></p>
<p>Extract the source using tar -zxvf and patch using gunzip to /usr/src/ folder.</p>
<p>Now cd to linux-2.6.27.2 and apply the patch as shown below:</p>
<div class="codetitle"><strong><br />
</strong></div>
<div class="codecontent" style="padding-left: 30px; "> patch -p1 &lt;../patch-2.6.27.2</div>
<div class="codecontent" style="padding-left: 30px; "></div>
<p><span>4. Configuration</span><br />
 You may copy the current configuration by copying the file .config.</p>
<p> </p>
<p style="padding-left: 30px; ">cp ../linux/.config config.old</p>
<p> Begin the configuration by wiping out all previous configurations and resetting the source directory to a pristine state:</p>
<p> </p>
<div class="codetitle"><strong> </strong></div>
<div class="codecontent" style="padding-left: 30px; ">$ make mrproper</div>
<p> </p>
<p>Run the configuration utility. Either of the below step can be used to run the configuration utility:</p>
<p> </p>
<div class="codetitle" style="padding-left: 30px; "><strong> </strong> make config &#8211; least friendly tool</div>
<div class="codetitle" style="padding-left: 30px; "></div>
<div class="codecontent" style="padding-left: 30px; ">  make oldconfig         (- will read the defaults from the existing .config file. Note that oldconfig will only work within the same major version of the kernel. You cannot, for example, use a 2.4.x .config with the 2.6.x kernel.)</div>
<div class="codecontent" style="padding-left: 30px; "></div>
<div class="codecontent" style="padding-left: 30px; "> make menuconfig      (- Most commonly and recommended method. Gives you a graphical front end to select your options)</div>
<p><span>5. Start Build</span><br />
Clean before the build:</p>
<p> </p>
<div class="codetitle"><strong> </strong></div>
<div class="codecontent" style="padding-left: 30px; "> make clean</div>
<div class="codecontent" style="padding-left: 30px; "></div>
<p> Start the build after cleaning process:</p>
<p> </p>
<div class="codetitle" style="padding-left: 30px; ">make bzImage</div>
<p><span>6. Build and install all the loadable modules</span></p>
<div class="codetitle"><strong> </strong></div>
<div class="codecontent" style="padding-left: 30px; ">  make modules<br />
 make modules_install</div>
<div class="codecontent" style="padding-left: 30px; "></div>
<p><span>7. Copy the required files and generate initrd</span><br />
 Copy the files over for the kernel itself</p>
<div class="codetitle"><strong> </strong></div>
<div class="codecontent" style="padding-left: 30px; "> cp .config /boot/config-2.6.27.2<br />
 cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.27.2<br />
 cp System.map /boot/System.map-2.6.27.2<br />
 mkinitrd /boot/initrd-2.6.27.2.img 2.6.27.2</div>
<p> If you come across an error like: &#8220;/dev/mapper/control: open failed: No such file or directory&#8221; , Run the following commands:</p>
<div class="codetitle"><strong> </strong></div>
<div class="codecontent" style="padding-left: 30px; ">  rm -rf /boot/initrd-2.6.27.2.img<br />
  mkinitrd &#8211;omit-lvm-modules /boot/initrd-2.6.27.2.img 2.6.27.2</div>
<p><span>8. Configure Grub &amp; enable failsafe</span><br />
  Open grub.conf file<br />
  Add the below code to the top of the kernel list:</p>
<p> </p>
<div class="codecontent" style="padding-left: 30px; ">title Red Hat Linux (2.6.27.2)<br />
root (hd0,0)<br />
kernel /vmlinuz-2.6.27.2 ro root=LABEL=/<br />
initrd /initrd-2.6.27.2.img</div>
<div class="codecontent" style="padding-left: 30px; "></div>
<p>  Set the default value to your working kernel. (NOTE: NOT NEW KERNEL)<br />
  Now save and exit from grub.conf file and enter into grub mode by typing &#8220;grub&#8221; from bash prompt<br />
  And set to boot from newly compiled kernel during next reboot:</p>
<p> </p>
<div class="codetitle" style="padding-left: 30px; "><strong> </strong> savedefault &#8211;default=0 &#8211;once</div>
<div class="codetitle" style="padding-left: 30px; "></div>
<p> If your server is up, you are done with your new kernel. Open the file grub.conf and change the value of default to &#8220;0&#8243;</p>
<p><span><span><strong>Congratulations! You are done with your new kernel.</strong></span></span></p>
<p> </p>
<p><strong><span style="font-weight: normal;"><br />
</span></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://linuxbuddies.com/2009/01/20/kernel-compilation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Processor type in Linux</title>
		<link>http://linuxbuddies.com/2009/01/20/processor-type-in-linux/</link>
		<comments>http://linuxbuddies.com/2009/01/20/processor-type-in-linux/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 18:59:47 +0000</pubDate>
		<dc:creator>Riyesh</dc:creator>
				<category><![CDATA[server tweak]]></category>
		<category><![CDATA[Add new tag]]></category>
		<category><![CDATA[cpuinfo]]></category>
		<category><![CDATA[get information]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Processor]]></category>
		<category><![CDATA[Processor type]]></category>

		<guid isPermaLink="false">http://linuxbuddies.com/?p=304</guid>
		<description><![CDATA[







To find the processor type and details
Get the Processor details:


cat /proc/cpuinfo

Find whether the processor is 32 or 64 bit:

 getconf LONG_BIT

Find the architecture:

uname -i



]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-thumbnail wp-image-303" title="proccesser" src="http://linuxbuddies.com/wp-content/uploads/2009/01/proccesser-150x150.jpg" alt="proccesser" width="150" height="150" /></p>
<table border="0" cellspacing="0" width="100%">
<tbody>
<tr valign="middle">
<td class="gensmall" align="right"></td>
</tr>
</tbody>
</table>
<div class="postbody"><span><strong>To find the processor type and details</strong></span></p>
<p>Get the Processor details:</p></div>
<div class="postbody"></div>
<div class="postbody"></div>
<div class="postbody" style="padding-left: 30px;">cat /proc/cpuinfo</div>
<div class="postbody" style="padding-left: 30px;"></div>
<div class="postbody">Find whether the processor is 32 or 64 bit:</div>
<div class="postbody"></div>
<div class="postbody" style="padding-left: 30px;"> getconf LONG_BIT</div>
<div class="postbody" style="padding-left: 30px;"></div>
<div class="postbody">Find the architecture:</div>
<div class="postbody"></div>
<div class="postbody" style="padding-left: 30px;">uname -i</div>
<div class="postbody" style="padding-left: 30px;"></div>
<div class="postbody" style="padding-left: 30px;"></div>
<div class="postbody" style="padding-left: 30px;"></div>
]]></content:encoded>
			<wfw:commentRss>http://linuxbuddies.com/2009/01/20/processor-type-in-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Enable/ disable ping requests in linux</title>
		<link>http://linuxbuddies.com/2009/01/20/enable-disable-ping-requests-in-linux/</link>
		<comments>http://linuxbuddies.com/2009/01/20/enable-disable-ping-requests-in-linux/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 18:54:11 +0000</pubDate>
		<dc:creator>Riyesh</dc:creator>
				<category><![CDATA[Network]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[server tweak]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ping]]></category>

		<guid isPermaLink="false">http://linuxbuddies.com/?p=299</guid>
		<description><![CDATA[ Ping Requests use ICMP protocols. This is enabled/disabled using sysctl values.
To Disable Ping:
 
echo 1 &#62; /proc/sys/net/ipv4/icmp_echo_ignore_all
 
To Enable Ping:
 
echo 0 &#62; /proc/sys/net/ipv4/icmp_echo_ignore_all
]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-thumbnail wp-image-298" title="ping" src="http://linuxbuddies.com/wp-content/uploads/2009/01/ping-150x150.gif" alt="ping" width="150" height="150" /> Ping Requests use ICMP protocols. This is enabled/disabled using sysctl values.<br />
To Disable Ping:</p>
<p> </p>
<p style="padding-left: 30px;">echo 1 &gt; /proc/sys/net/ipv4/icmp_echo_ignore_all</p>
<p style="padding-left: 30px;"> </p>
<p>To Enable Ping:</p>
<p> </p>
<p style="padding-left: 30px;">echo 0 &gt; /proc/sys/net/ipv4/icmp_echo_ignore_all</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxbuddies.com/2009/01/20/enable-disable-ping-requests-in-linux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SSH login using Public/Private key authentication</title>
		<link>http://linuxbuddies.com/2009/01/20/ssh-login-using-publicprivate-key-authentication/</link>
		<comments>http://linuxbuddies.com/2009/01/20/ssh-login-using-publicprivate-key-authentication/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 18:50:47 +0000</pubDate>
		<dc:creator>Riyesh</dc:creator>
				<category><![CDATA[Network]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[private key]]></category>
		<category><![CDATA[Public key]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://linuxbuddies.com/?p=294</guid>
		<description><![CDATA[ Scenario
To log into &#8220;Server A&#8221; from &#8220;Server B&#8221; without using passwords. Users for both the server will be &#8220;root&#8221;
Process

 Login to &#8220;Server B&#8221; as root user and generate key for the root user. No need to enter any passphrase while generating this key.


ssh-keygen -t rsa
 
Once the key is generated, copy the ...]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-thumbnail wp-image-295" title="key1" src="http://linuxbuddies.com/wp-content/uploads/2009/01/key1-150x150.png" alt="key1" width="150" height="150" /><strong> Scenario</strong></p>
<p><strong><span style="font-weight: normal;">To log into &#8220;Server A&#8221; from &#8220;Server B&#8221; without using passwords. Users for both the server will be &#8220;root&#8221;</span></strong></p>
<p><strong><span style="font-weight: normal;"><span><strong>Process</strong></span><br />
</span></strong></p>
<p><strong><span style="font-weight: normal;"> Login to &#8220;Server B&#8221; as root user and generate key for the root user. No need to enter any passphrase while generating this key.</span></strong></p>
<p><strong><span style="font-weight: normal;"><br />
</span></strong></p>
<p style="padding-left: 30px; "><strong><span style="font-weight: normal;">ssh-keygen -t rsa</span></strong></p>
<p style="padding-left: 30px; "> </p>
<p><strong><span style="font-weight: normal;">Once the key is generated, copy the contents of &#8220;Server B&#8221; /root/.ssh/id_rsa.pub to &#8220;Server A&#8221; /root/.ssh/authorized_keys file. Make sure that the permission of authorized_keys is 0600 and .ssh folder is 0700 .</p>
<p>Also make sure that you have the following lines in your /etc/ssh/sshd_config file: <br />
RSAAuthentication yes<br />
PubkeyAuthentication yes<br />
</span></strong></p>
<p><strong><span style="font-weight: normal;">Finally restart your ssh service and try logging to your &#8220;Server B&#8221; from &#8220;Server A&#8221;:</span></strong></p>
<p><strong><span style="font-weight: normal;"><br />
</span></strong></p>
<p style="padding-left: 30px; "><strong><span style="font-weight: normal;">/etc/init.d/sshd restart</span></strong></p>
<p style="padding-left: 30px; "><strong><span style="font-weight: normal;">ssh [Server_A_ip]<br />
</span></strong></p>
<p style="padding-left: 30px; "><strong><span style="font-weight: normal;"><br />
</span></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://linuxbuddies.com/2009/01/20/ssh-login-using-publicprivate-key-authentication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Usage of Find Command</title>
		<link>http://linuxbuddies.com/2009/01/18/usage-of-find-command/</link>
		<comments>http://linuxbuddies.com/2009/01/18/usage-of-find-command/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 05:31:02 +0000</pubDate>
		<dc:creator>Riyesh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://linuxbuddies.com/?p=288</guid>
		<description><![CDATA[&#8220;find&#8221; is a versatile tool which can be used to locate files and directories satisfying different user criteria. But the sheer number of options for this command line tool makes it at the same time both powerful and encumbering for the user. 
Here are a few combinations which one can use to ...]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-thumbnail wp-image-289" title="search1" src="http://linuxbuddies.com/wp-content/uploads/2009/01/search1-150x150.jpg" alt="search1" width="150" height="150" /><span>&#8220;find&#8221;</span> is a versatile tool which can be used to locate files and directories satisfying different user criteria. But the sheer number of options for this command line tool makes it at the same time both powerful and encumbering for the user. <br />
Here are a few combinations which one can use to get useful results using find command.</p>
<p>* Find all HTML files starting with letter &#8216;a&#8217; in your current directory (Case sensitive):</p>
<p> </p>
<p style="padding-left: 30px; ">find . -name a\*.html</p>
<p style="padding-left: 30px; "> </p>
<p>Same as above but case insensitive search:</p>
<p> </p>
<p style="padding-left: 30px; ">find . -iname a\*.html</p>
<p style="padding-left: 30px; "> </p>
<p>Find files which are larger than 5 MB in size:</p>
<p style="padding-left: 30px; ">find . -size +5000k -type </p>
<p>Here the &#8216;+&#8217; in &#8216;+5000k&#8217; indicates greater than and k is kilobytes. And the dot &#8216;.&#8217; indicates the current directory. The -type option can take any of the following values:<br />
f &#8211; file<br />
d &#8211; directory<br />
l &#8211; symbolic link<br />
c &#8211; character<br />
p &#8211; named pipe (FIFO)<br />
s &#8211; socket<br />
b &#8211; block device</p>
<p>* Find all empty files in your directory:</p>
<p> </p>
<p style="padding-left: 30px; ">find . -size 0c -type f</p>
<p>&#8230; Which is all files with 0 bytes size. The option -size can take the following:<br />
c &#8211; bytes<br />
w &#8211; 2 byte words<br />
k &#8211; kilo bytes<br />
b &#8211; 512 byte blocks</p>
<p>* Find is very powerful in that you can combine it with other commands. For example, to find all empty files in the current directory and delete them, do the following:</p>
<p> </p>
<p style="padding-left: 30px;">find . -empty -maxdepth 1 -exec rm {} \;</p>
<p> To search for a html file having the text &#8216;Web sites&#8217; in it, you can combine find with grep as follows:</p>
<p style="padding-left: 30px;"> </p>
<p style="padding-left: 30px;">find . -type f -iname \*.html -exec grep -s &#8220;Web sites&#8221; {} \;</p>
<p>&#8230; the -s option in grep suppresses errors about non-existent or unreadable files. And {} is a placeholder for the files found. The semicolon &#8216;;&#8217; is escaped using backslash so as not to be interpreted by bash shell.</p>
<p>Compress log files on an individual basis:</p>
<p> </p>
<p style="padding-left: 30px;">find /var -iname \*.log -exec bzip {} \;</p>
<p>Find all files which belong to user lal and change its ownership to ravi:</p>
<p> </p>
<p style="padding-left: 30px;">find / -user lal -exec chown ravi {} \;</p>
<p>xargs command cal also be used instead of the -exec option as follows:</p>
<p> </p>
<p style="padding-left: 30px;">find /var -iname \*.log | xargs bzip -</p>
<p> Find all files which do not belong to any user:</p>
<p style="padding-left: 30px;"> </p>
<p style="padding-left: 30px;">find . -nouser</p>
<p>Find files which have permissions rwx for user and rw for group and others :</p>
<p> </p>
<p style="padding-left: 30px;">find . -perm 766</p>
<p>and then list them:</p>
<p> </p>
<p style="padding-left: 30px;">find . -perm 766 -exec ls -l {} \;</p>
<p>Find all directories with name music_files:</p>
<p style="padding-left: 30px; "> </p>
<p style="padding-left: 30px; ">find -type d -iname \*music_files\* </p>
<p> find files of size between 700k and 1000k</p>
<p> </p>
<p style="padding-left: 30px; ">find . \( -size +700k -and -size -1000k \)</p>
<p>How about getting a formatted output of the above command with the size of each file listed ?:</p>
<p> </p>
<p style="padding-left: 30px; ">find . \( -size +700k -and -size -1000k \) -exec du -Hs {} \; 2&gt;/dev/null</p>
<p>You can also limit your search by file system type. For example, to restrict search to files residing only in the NTFS and VFAT filesystem, do the following:</p>
<p> </p>
<p>find / -maxdepth 2 \( -fstype vfat -or -fstype ntfs \) 2&gt; /dev/null</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxbuddies.com/2009/01/18/usage-of-find-command/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Disable/Enable safe_mode/register_globals value</title>
		<link>http://linuxbuddies.com/2009/01/18/283/</link>
		<comments>http://linuxbuddies.com/2009/01/18/283/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 04:55:40 +0000</pubDate>
		<dc:creator>Riyesh</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Disable/Enable safe_mode/register_globals value]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[register_globals]]></category>
		<category><![CDATA[value]]></category>

		<guid isPermaLink="false">http://linuxbuddies.com/?p=283</guid>
		<description><![CDATA[You can disable/enable safe_mode either using .htaccess, php.ini or httpd.conf file. Selecting the right way depends on your php-apache configuration.
If php is compiled as a dso module for apache, you will have to use .htaccess method
If php-apache relationship is CGI, then php.ini file is used to disable safe_mode value
 If none ...]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-thumbnail wp-image-59" title="apache_1" src="http://linuxbuddies.com/wp-content/uploads/2008/12/apache_1-150x150.jpg" alt="apache_1" width="150" height="150" />You can disable/enable safe_mode either using .htaccess, php.ini or httpd.conf file. Selecting the right way depends on your php-apache configuration.<br />
If php is compiled as a dso module for apache, you will have to use .htaccess method</p>
<p>If php-apache relationship is CGI, then php.ini file is used to disable safe_mode value</p>
<p> If none of the above works, contact your hosting provider and ask them to disable safe_mode through the servers httpd.conf file. It can be done in your VirtualHost configuration inside httpd.conf file.</p>
<p><strong>.htaccess Code</strong></p>
<p style="padding-left: 60px; "><strong><span style="font-weight: normal;">php_admin_value safe_mode Off [OR]<br />
php_flag safe_mode Off</span></strong></p>
<p>edit php.ini ( use this command to find php.ini file location &#8211; &#8220;php -i | grep php.in&#8221; ) </p>
<p style="padding-left: 60px; ">safe_mode = Off</p>
<p>edit httpd.cof </p>
<p style="padding-left: 30px; ">php_admin_value safe_mode Off</p>
<p>Verify your settings</p>
<p> Create phpinfo page file  and put it on the document root and access the page to see if the defult value has been overrided with your defult value.</p>
<p>phpinfo sample. </p>
<p style="padding-left: 30px;">example <br />
vi  phpinfo.php</p>
<p style="padding-left: 30px;">&lt;?php<br />
phpinfo();<br />
?&gt;</p>
<p>You may use register_globals keyword instead of safe_mode to change values of register_globals variable [off/on values are accepted]</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxbuddies.com/2009/01/18/283/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Limiting FTP users to their home directory</title>
		<link>http://linuxbuddies.com/2009/01/16/limiting-ftp-users-to-their-home-directory/</link>
		<comments>http://linuxbuddies.com/2009/01/16/limiting-ftp-users-to-their-home-directory/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 15:22:01 +0000</pubDate>
		<dc:creator>Riyesh</dc:creator>
				<category><![CDATA[FTP]]></category>
		<category><![CDATA[User administration]]></category>
		<category><![CDATA[server tweak]]></category>
		<category><![CDATA[limit ftp user]]></category>
		<category><![CDATA[pro-ftpd]]></category>
		<category><![CDATA[pure-ftpd]]></category>
		<category><![CDATA[vsftpd]]></category>

		<guid isPermaLink="false">http://linuxbuddies.com/?p=280</guid>
		<description><![CDATA[ Purpose
Unless the ftp users are limited to their home directories, they will able to access all files &#38; folders on the server .
How to
Below you may see how this can done to 3 of the ftp servers used in common.
Pro-ftpd
vsftpd
pure-ftpd
Pure-ftpd 
vi  /etc/pure-ftpd.conf
And change the following line
ChrootEveryone=YES
pro-ftpd
 vi  /etc/proftpd.conf
DefaultRoot ...]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-thumbnail wp-image-279" title="ftp" src="http://linuxbuddies.com/wp-content/uploads/2009/01/ftp-150x150.gif" alt="ftp" width="150" height="150" /> <strong>Purpose</strong></p>
<p>Unless the ftp users are limited to their home directories, they will able to access all files &amp; folders on the server .</p>
<p><strong>How to</strong></p>
<p>Below you may see how this can done to 3 of the ftp servers used in common.</p>
<p>Pro-ftpd</p>
<p>vsftpd</p>
<p>pure-ftpd</p>
<p><strong>Pure-ftpd </strong></p>
<p style="padding-left: 30px;">vi  /etc/pure-ftpd.conf</p>
<p>And change the following line</p>
<p style="padding-left: 30px;">ChrootEveryone=YES</p>
<p><strong>pro-ftpd</strong></p>
<p style="padding-left: 30px;"><strong> </strong>vi  /etc/proftpd.conf</p>
<p style="padding-left: 30px;">DefaultRoot ~</p>
<p><strong>Vsftpd </strong></p>
<p style="padding-left: 30px;">vi /etc/vsftpd.conf</p>
<div class="codecontent" style="padding-left: 30px;">chroot_local_user=YES</div>
<p style="padding-left: 30px;"><strong><br />
</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://linuxbuddies.com/2009/01/16/limiting-ftp-users-to-their-home-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ImageMagick Installation</title>
		<link>http://linuxbuddies.com/2009/01/04/imagemagick-installation/</link>
		<comments>http://linuxbuddies.com/2009/01/04/imagemagick-installation/#comments</comments>
		<pubDate>Sun, 04 Jan 2009 14:54:27 +0000</pubDate>
		<dc:creator>Riyesh</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[DPX]]></category>
		<category><![CDATA[edit]]></category>
		<category><![CDATA[EXR]]></category>
		<category><![CDATA[GIF]]></category>
		<category><![CDATA[ImageMagick]]></category>
		<category><![CDATA[JPEG]]></category>
		<category><![CDATA[JPEG-2000]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[PhotoCD]]></category>
		<category><![CDATA[PNG]]></category>

		<guid isPermaLink="false">http://linuxbuddies.com/?p=238</guid>
		<description><![CDATA[ImageMagick® is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats (over 100) including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF. Use ImageMagick to translate, flip, mirror, rotate, scale, shear and transform images, adjust image ...]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-239" title="imagemagick" src="http://linuxbuddies.com/wp-content/uploads/2008/12/imagemagick.jpg" alt="imagemagick" width="114" height="118" />ImageMagick<sup><a href="http://tarr.uspto.gov/servlet/tarr?regser=serial&amp;entry=78333969" target="1759674696">®</a></sup> is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of <a href="http://www.imagemagick.org/script/formats.php">formats</a> (over 100) including <a href="http://www.imagemagick.org/script/motion-picture.php">DPX</a>, <a href="http://www.imagemagick.org/script/high-dynamic-range.php">EXR</a>, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF. Use ImageMagick to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.</p>
<p><span style="text-decoration: underline;">Installation</span></p>
<p>Please follow the steps to install imagemagick</p>
<p>download latest version from source</p>
<blockquote><p>ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz</p></blockquote>
<p>unpack the source</p>
<blockquote><p>tar  zxvf  ImageMagick.tar.gz</p></blockquote>
<p>Next configure and compile ImageMagick:</p>
<blockquote><p>cd ImageMagick.6.?.?</p>
<p>./configure</p></blockquote>
<blockquote><p>make</p></blockquote>
<p>Installing</p>
<blockquote><p>make install</p></blockquote>
<p><a href="http://www.imagemagick.org/script/download.php">PerlMagick</a> is an objected-oriented <a href="http://www.perl.com/perl/">Perl</a> interface to ImageMagick. Use the module to read, manipulate, or write an image or image sequence from within a Perl script. This makes it very suitable for Web CGI scripts. You must have ImageMagick 6.2.0 or above and Perl version 5.005_02 or greater installed on your system for either of these utilities to work.</p>
<blockquote><p>cd PerlMagick</p>
<p class="MsoNormal">perl Makefile.PL<br />
make<br />
make install</p>
<p class="MsoNormal"> </p>
</blockquote>
<p class="MsoNormal">verify your installation</p>
<p class="MsoNormal"> </p>
<blockquote>
<pre class="text">/usr/local/bin/convert logo: logo.gif</pre>
</blockquote>
<pre class="text">Congratulations, now your ready to go..............</pre>
]]></content:encoded>
			<wfw:commentRss>http://linuxbuddies.com/2009/01/04/imagemagick-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Email to Fax Gateway!</title>
		<link>http://linuxbuddies.com/2009/01/04/email-to-fax-gateway/</link>
		<comments>http://linuxbuddies.com/2009/01/04/email-to-fax-gateway/#comments</comments>
		<pubDate>Sun, 04 Jan 2009 08:49:12 +0000</pubDate>
		<dc:creator>Riyesh</dc:creator>
				<category><![CDATA[Hylafax]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[Qmail]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Sendmail]]></category>
		<category><![CDATA[email to fax. email to fax gateway]]></category>
		<category><![CDATA[email2fax]]></category>
		<category><![CDATA[email2fax gateway. pdf fax]]></category>
		<category><![CDATA[jpeg fax]]></category>
		<category><![CDATA[msword fax]]></category>
		<category><![CDATA[postscript fax]]></category>
		<category><![CDATA[tiff fax]]></category>

		<guid isPermaLink="false">http://linuxbuddies.com/?p=257</guid>
		<description><![CDATA[This is an awasome feature of hylafax. User can send fax using email applications. Ex: riyesh@23656237.fax
We need to add some simple scipts to activate this feature.By defult hylafax will not decode the attachments.So you need to edit /etc/hylafax/hyla.conf.
specify mime type directory location in /etc/hylafax/hyla.conf
add the following line
MIMEConverters: /var/spool/hylafax/mimetype
Then create the ...]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-thumbnail wp-image-258" title="email2faxthump" src="http://linuxbuddies.com/wp-content/uploads/2009/01/email2faxthump-150x70.jpg" alt="email2faxthump" width="150" height="70" />This is an awasome feature of hylafax. User can send fax using email applications. Ex: riyesh@23656237.fax</p>
<p>We need to add some simple scipts to activate this feature.By defult hylafax will not decode the attachments.So you need to edit /etc/hylafax/hyla.conf.</p>
<p>specify mime type directory location in /etc/hylafax/hyla.conf</p>
<p>add the following line</p>
<blockquote><p>MIMEConverters: /var/spool/hylafax/mimetype</p></blockquote>
<p>Then create the converting scripts under /var/spool/hylafax/mimetype</p>
<blockquote><p>mkdir /var/spool/hylafax/mimetype</p></blockquote>
<p>you need to create followin directories under /var/spool/hylafax/mimetype</p>
<blockquote><p>mkdir application</p>
<p>mkdir image</p>
<p>mkdir text</p></blockquote>
<p>the tree look like this</p>
<blockquote><p>/var/spool/hylafax/mimetype/<br />
/var/spool/hylafax/mimetype/application/pdf<br />
/var/spool/hylafax/mimetype/application/ps<br />
/var/spool/hylafax/mimetype/image/tiff</p>
<p>/var/spool/hylafax/mimetype/text/html</p>
<p><span id="more-257"></span></p></blockquote>
<p><strong>For msword type of files </strong>create msword under /var/spool/hylafax/mimetype/application/</p>
<blockquote><p>cd /var/spool/hylafax/mimetype/application/</p>
<p>touch msword</p>
<p>chmod +x  msword</p>
<p>vi msword</p></blockquote>
<p>add the following lines in msword script</p>
<blockquote><p>#!/bin/bash<br />
antiword $1<br />
exit</p>
<p><!--more--></p></blockquote>
<p><strong>For PDF type of files</strong> create pdf under /var/spool/hylafax/mimetype/application/</p>
<blockquote><p>cd /var/spool/hylafax/mimetype/application/</p>
<p>touch pdf</p>
<p>chmod +x pdf</p>
<p>vi pdf</p></blockquote>
<p>add the following lines in pdf script</p>
<blockquote><p>#!/bin/sh<br />
#/application/pdf<br />
# convert PDF attachment to Postscript for HylaFAX to send<br />
pdf2ps $1 -<br />
# if you want to send multipage pdf attachments it is better to use &#8220;pdftops&#8221;<br />
# use the line below instead of &#8220;pdf2ps $1 -&#8221;<br />
# /usr/bin/pdftops $1 -</p>
<p><!--more--><strong><br />
</strong></p></blockquote>
<p><strong>For postscript type of files</strong> create postscript under /var/spool/hylafax/mimetype/application/</p>
<blockquote><p>cd /var/spool/hylafax/mimetype/application/</p>
<p>touch postscript</p>
<p>chmod +x postscript</p>
<p>vi postscript</p></blockquote>
<p>add the following lines in postscript script</p>
<blockquote><p>#!/bin/sh<br />
#/application/pdf<br />
# convert PDF attachment to Postscript for HylaFAX to send<br />
pdf2ps $1 -<br />
# if you want to send multipage pdf attachments it is better to use &#8220;pdftops&#8221;<br />
# use the line below instead of &#8220;pdf2ps $1 -&#8221;<br />
# /usr/bin/pdftops $1 -<br />
mail:/var/spool/hylafax/mimetype/application #<br />
mail:/var/spool/hylafax/mimetype/application # cat postscript<br />
#!/bin/sh<br />
#/application/ps<br />
# convert PS attachment to Postscript for HylaFAX to send<br />
echo $1</p></blockquote>
<p><!--more--><strong>For PS attachment files </strong>create ps under /var/spool/hylafax/mimetype/application</p>
<blockquote><p>cd /var/spool/hylafax/mimetype/application/</p>
<p>touch postscript</p>
<p>chmod +x postscript</p>
<p>vi postscript</p></blockquote>
<p>add the following lines in ps script</p>
<blockquote><p>#!/bin/sh<br />
#/application/ps<br />
# convert PS attachment to Postscript for HylaFAX to send<br />
echo $1</p></blockquote>
<p><!--more--><strong>For rtf attachement files</strong> create rtf under /var/spool/hylafax/mimetype/application</p>
<blockquote><p>cd /var/spool/hylafax/mimetype/application/</p>
<p>touch rtf</p>
<p>chmod +x rtf</p>
<p>vi rtf</p></blockquote>
<p>add the following lines in rtf</p>
<blockquote><p>#!/bin/sh<br />
#/application/rtf<br />
# convert RTF attachment to Postscript for HylaFAX to send<br />
/usr/bin/unrtf &#8211;html $1 | /usr/bin/html2ps</p></blockquote>
<p><!--more--><strong>For jpeg attachment files </strong>create jpeg under  /var/spool/hylafax/mimetype/image</p>
<blockquote><p>cd /var/spool/hylafax/mimetype/image</p>
<p>touch image</p>
<p>chmod +x image</p>
<p>vi image</p></blockquote>
<p>add the following lines in jpeg</p>
<blockquote><p>#! /bin/sh<br />
/usr/bin/jpeg2ps  $1<br />
exit</p>
<p><!--more--></p></blockquote>
<p><strong>For tiff attachment files </strong>create tiff under /var/spool/hylafax/mimetype/image</p>
<blockquote><p>cd /var/spool/hylafax/mimetype/image</p>
<p>touch tiff</p>
<p>chmod +x tiff<br />
vi tiff</p></blockquote>
<p>Then add the following lines</p>
<blockquote><p>#! /bin/sh<br />
/usr/bin/jpeg2ps  $1<br />
exit<br />
mail:/var/spool/hylafax/mimetype/image # cat tiff<br />
#!/bin/sh<br />
#/image/tif<br />
# convert TIF attachment to Postscript for HylaFAX to send<br />
/usr/bin/tiff2ps $1<br />
# if you want to send multipage tiff images, than you have to add the option &#8220;-a&#8221;<br />
# for example:<br />
#/usr/bin/tiff2ps -a $1</p></blockquote>
<p><!--more--><strong>For HTML type  files</strong> create html under /var/spool/hylafax/mimetype/text</p>
<blockquote><p>cd /var/spool/hylafax/mimetype/text</p>
<p>touch html</p>
<p>chmod +x html<br />
vi html</p></blockquote>
<p>then add the following lines.</p>
<blockquote><p>#! /bin/sh<br />
/usr/bin/html2ps   $1<br />
exit</p>
<p><!--more--></p></blockquote>
<p><strong>Integrating with MTA&#8217;s </strong></p>
<blockquote><p><strong><br />
</strong></p></blockquote>
<blockquote><p>cd /usr/src/hylafax-(source package)</p>
<p>cd faxmail</p></blockquote>
<p>there you can see the files</p>
<blockquote><p>mailfax.sh-sendmail</p>
<p>mailfax.sh-postfix</p>
<p>mailfax.sh-qmail</p>
<p>mailfax.sh-smail</p></blockquote>
<p>do as per the files says.</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxbuddies.com/2009/01/04/email-to-fax-gateway/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
	</channel>
</rss>
