<?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>Kurinchi Blogger Scribbles ... &#187; Security</title>
	<atom:link href="http://kurinchilamp.kurinchilion.com/category/security/feed" rel="self" type="application/rss+xml" />
	<link>http://kurinchilamp.kurinchilion.com</link>
	<description>On Open Source Technologies</description>
	<lastBuildDate>Mon, 02 Jan 2012 06:14:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>WebScarab for web application test</title>
		<link>http://kurinchilamp.kurinchilion.com/2009/11/webscarab-for-web-application-test.html</link>
		<comments>http://kurinchilamp.kurinchilion.com/2009/11/webscarab-for-web-application-test.html#comments</comments>
		<pubDate>Fri, 27 Nov 2009 05:32:37 +0000</pubDate>
		<dc:creator>kurinchilamp</dc:creator>
				<category><![CDATA[Free Download]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[bandwidth simul]]></category>
		<category><![CDATA[session id analysis]]></category>
		<category><![CDATA[spider url's]]></category>
		<category><![CDATA[tester]]></category>
		<category><![CDATA[testing tool]]></category>
		<category><![CDATA[WebScarab]]></category>

		<guid isPermaLink="false">http://kurinchilamp.kurinchilion.com/?p=727</guid>
		<description><![CDATA[WebScarab is a testing tool used for analysing application data that is passed between browsers and servers. It can be used to review and modify data at either end by intercepting data originating from http and https layers. This tool can also be used as a bandwidth simulator (slow/fast network), in session id analysis, spidering [...]]]></description>
			<content:encoded><![CDATA[<p><strong>WebScarab</strong> is a testing tool used for analysing application data that is passed between browsers and servers. It can be used to review and modify data at either end by intercepting data originating from http and https layers. This tool can also be used as a bandwidth simulator (slow/fast network), in session id analysis, spidering url&#8217;s, parameter analysis and for many other testing schemes.</p>
<p>WebScarab is developed as an open source tool by The Open Web Application Security Project (OWASP) and can be downloaded from <a href="http://www.owasp.org/index.php/Category:OWASP_WebScarab_Project ">OWASP </a>website</p>
]]></content:encoded>
			<wfw:commentRss>http://kurinchilamp.kurinchilion.com/2009/11/webscarab-for-web-application-test.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SSL: Points to consider before choosing the right certificate</title>
		<link>http://kurinchilamp.kurinchilion.com/2009/11/ssl-points-to-consider-before-choosing-the-right-certificate.html</link>
		<comments>http://kurinchilamp.kurinchilion.com/2009/11/ssl-points-to-consider-before-choosing-the-right-certificate.html#comments</comments>
		<pubDate>Tue, 17 Nov 2009 01:00:58 +0000</pubDate>
		<dc:creator>kurinchilamp</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[certificate security]]></category>
		<category><![CDATA[certificate warranty]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[secure data transfer]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://kurinchilamp.kurinchilion.com/?p=716</guid>
		<description><![CDATA[Points to consider before choosing the SSL certificate i) Strength of the encryption offered by the certificates ii) Browser comptability or recognition of the certificates. A well known brand is recognized by most of the browsers in the market iii) If the certificate offers backward comptability across browsers offering iv) Whether the Certification Authority (CA) [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Points to consider before choosing the SSL certificate</strong></p>
<p>i) Strength of the encryption offered by the certificates</p>
<p>ii) Browser comptability or recognition of the certificates. A well known brand is recognized by most of the browsers in the market</p>
<p>iii) If the certificate offers backward comptability across browsers offering </p>
<p>iv) Whether the Certification Authority (CA) is a Trusted Root or if they use a Chained Root Certificates. </p>
<p>v) Which web server will be used for SSL installation. Chained root certificates may be little complicated on some web servers.</p>
<p>vi) Nature of the application that will be served over the SSL &#8211; depending on the volume of the transactions and the value of each transaction</p>
<p>vii) Warranty offered by the certificate (if that matters which most certainly is when it comes to ECommerce products)</p>
]]></content:encoded>
			<wfw:commentRss>http://kurinchilamp.kurinchilion.com/2009/11/ssl-points-to-consider-before-choosing-the-right-certificate.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Passing data from HTTPS to HTTP</title>
		<link>http://kurinchilamp.kurinchilion.com/2009/10/passing-data-from-https-to-http.html</link>
		<comments>http://kurinchilamp.kurinchilion.com/2009/10/passing-data-from-https-to-http.html#comments</comments>
		<pubDate>Sun, 11 Oct 2009 06:04:35 +0000</pubDate>
		<dc:creator>kurinchilamp</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[FireBug]]></category>
		<category><![CDATA[HTTP Watch]]></category>
		<category><![CDATA[https to http get referer]]></category>
		<category><![CDATA[Live HTTP Headers]]></category>
		<category><![CDATA[pass data from http to https]]></category>

		<guid isPermaLink="false">http://kurinchilamp.kurinchilion.com/?p=703</guid>
		<description><![CDATA[Have you ever come across a situation when you need to pass data from HTTPS to HTTP controlled web pages? If you have, you would have come to know that the header values especially REFERER values become empty. Reason for this being that it is not secure to transfer data from a security controlled HTTPS [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Have you ever come across a situation when you need to pass data from HTTPS to HTTP controlled web pages?</strong> If you have, you would have come to know that the header values especially REFERER values become empty. Reason for this being that it is not secure to transfer data from a security controlled HTTPS layer to a non-secure site serving HTTP content.</p>
<p>This is one of the key points to remember if you are involved in integrating applications</p>
<p><strong>Solution(s) to the above scenario</strong><br />
i) Transfer data between HTTPs layers instead<br />
ii) pass GET data as query string values<br />
iii) Programatically handle the session across the two sites behind the scenes either by storing a cookie or through database controllers</p>
<p>Some of the tools that comes handy in checking the Header Values are <strong>FireBug, Live HTTP Headers, HTTP Watch plugin</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://kurinchilamp.kurinchilion.com/2009/10/passing-data-from-https-to-http.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Generating Certificate for validation (CSR generation)</title>
		<link>http://kurinchilamp.kurinchilion.com/2009/09/generating-certificate-for-validation-csr-generation.html</link>
		<comments>http://kurinchilamp.kurinchilion.com/2009/09/generating-certificate-for-validation-csr-generation.html#comments</comments>
		<pubDate>Fri, 11 Sep 2009 00:33:00 +0000</pubDate>
		<dc:creator>kurinchilamp</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[LINUX]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[godaddy]]></category>
		<category><![CDATA[rapidssl]]></category>
		<category><![CDATA[secure certificate]]></category>
		<category><![CDATA[security certificate]]></category>
		<category><![CDATA[SSL certificate]]></category>
		<category><![CDATA[thawte]]></category>
		<category><![CDATA[verisign]]></category>

		<guid isPermaLink="false">http://kurinchilamp.kurinchilion.com/?p=668</guid>
		<description><![CDATA[In order to install SSL certificates on your Apache server you need to generate a key pair and a CSR (certificate signing request) as the first step. The following points will guide you in the creation of CSR file. Once you finish generating the CSR file, you need to paste the content of the CSR [...]]]></description>
			<content:encoded><![CDATA[<p>In order to install SSL certificates on your Apache server you need to generate a key pair and a CSR (certificate signing request) as the first step. The following points will guide you in the creation of CSR file.</p>
<p>Once you finish generating the CSR file, you need to paste the content of the CSR file on to the SSL certificate request page in order for the certificate authorities to start their verification process.</p>
<p><strong>Command line prompts in a Linux box</strong></p>
<p>Find where openssl is installed and navigated to that directory<br />
<strong>$ whereis openssl</strong></p>
<p>Mostly it will be at /usr/bin/. If it is in a different path, then navigate to that directory path<br />
<strong>$ cd /usr/bin</strong><br />
<span id="more-668"></span><br />
If asked for a pass phrase, enter a phrase which you need to use when generating the CSR file from the key file.</p>
<p>Next, we will use des3 algorithm to generate the key. If you want to generate a key for a site abc.com you can give certificate-name=www.abc.com for easy reference<br />
<strong>$ openssl genrsa -des3 -out certificate-name.key 2048</strong></p>
<p>Next in the process is to generate the CSR file from the key<br />
<strong>$ openssl req -new -key certificate-name.key -out certificate-name.csr</strong></p>
<p>This will involve a step of questions where you need to answer your two-digit country code, province or state, company name, organizational unit name, company name and email address.For the part that involves &#8220;Common Name (eg, your name or your server&#8217;s name)&#8221; enter the domain name for which you want to get the certificate (for e.g. www.abc.com).</p>
<p>Now, copy the content of CSR file and paste it on the certificate request page (probably the web page of the certificate authorities web page like <strong>RapidSSL, GoDaddy, VeriSign, Thawte SSL </strong>certificate issuance authority.</p>
<p>After submitting the .csr file, you need to wait for the .cer files from the certificate authority. If you are going with Godaddy, they will send you a bundle certificate along with the original .cer file which you need to install in your web server.</p>
]]></content:encoded>
			<wfw:commentRss>http://kurinchilamp.kurinchilion.com/2009/09/generating-certificate-for-validation-csr-generation.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Session Poisoning, Cookie Poisoning</title>
		<link>http://kurinchilamp.kurinchilion.com/2009/08/session-poisoning-cookie-poisoning.html</link>
		<comments>http://kurinchilamp.kurinchilion.com/2009/08/session-poisoning-cookie-poisoning.html#comments</comments>
		<pubDate>Sun, 09 Aug 2009 08:09:57 +0000</pubDate>
		<dc:creator>kurinchilamp</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Cookie Poisoning]]></category>
		<category><![CDATA[Session Poisoning]]></category>

		<guid isPermaLink="false">http://kurinchilamp.kurinchilion.com/?p=592</guid>
		<description><![CDATA[Session poisoning or Session Pollution is a term used to refer to security exploit when an invalidated input is assigned to session variables which then gets carried over to other pages opening the supposed to be secured pages to outside world. It can also refer to a state when more than one application shares the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Session poisoning or Session Pollution </strong>is a term used to refer to security exploit when an invalidated input is assigned to session variables which then gets carried over to other pages opening the supposed to be secured pages to outside world.</p>
<p>It can also refer to a state when more than one application shares the same session variable which when modified without necessary validation causes a race condition.</p>
<p>There is a possibility for an attack or a session hijack when the external agent gets control over the session variable used by victim on the server. Both the agent and the victim needs to have access on the same server for such attacks to take place.</p>
<p>When the same scenario happens on the cookie variables, it is called <strong>cookie poisoning</strong>. </p>
<p>Precaution to avoid such hijacks are to validate each condition if a cookie or a session is shared or if values are assigned to session or cookies. In such cases, it is also advisable to use a secured transaction path to avoid such attacks.</p>
]]></content:encoded>
			<wfw:commentRss>http://kurinchilamp.kurinchilion.com/2009/08/session-poisoning-cookie-poisoning.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to hide Apache version, Modules loaded, PHP Version?</title>
		<link>http://kurinchilamp.kurinchilion.com/2009/08/how-to-hide-apache-version-modules-loaded-php-version.html</link>
		<comments>http://kurinchilamp.kurinchilion.com/2009/08/how-to-hide-apache-version-modules-loaded-php-version.html#comments</comments>
		<pubDate>Sat, 08 Aug 2009 09:26:45 +0000</pubDate>
		<dc:creator>kurinchilamp</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tips, Tricks, Guides]]></category>
		<category><![CDATA[ServerSignature]]></category>
		<category><![CDATA[ServerTokens]]></category>

		<guid isPermaLink="false">http://kurinchilamp.kurinchilion.com/?p=587</guid>
		<description><![CDATA[It is often advisable not to disclose information than is necessary when web request are made to Apache server. By default, Apache displays the version of the server, modules loaded in the server and the version of PHP if PHP is configured with Apache. In httpd.conf file, set the following directives. ServerSignature Off ServerTokens ProductOnly [...]]]></description>
			<content:encoded><![CDATA[<p>It is often advisable not to disclose information than is necessary when web request are made to Apache server.</p>
<p>By default, Apache displays the version of the server, modules loaded in the server and the version of PHP if PHP is configured with Apache.</p>
<p>In <strong>httpd.conf </strong>file, set the following directives.</p>
<p><strong>ServerSignature Off<br />
ServerTokens ProductOnly</strong></p>
<p>By default, <strong>ServerSignature </strong>is set to Off and <strong>ServerTokens </strong>is set to Full in most Linux distros.</p>
]]></content:encoded>
			<wfw:commentRss>http://kurinchilamp.kurinchilion.com/2009/08/how-to-hide-apache-version-modules-loaded-php-version.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Security: Preventing Session Fixation</title>
		<link>http://kurinchilamp.kurinchilion.com/2009/07/php-security-session-fixation-and-how-to-prevent-it.html</link>
		<comments>http://kurinchilamp.kurinchilion.com/2009/07/php-security-session-fixation-and-how-to-prevent-it.html#comments</comments>
		<pubDate>Tue, 28 Jul 2009 03:31:04 +0000</pubDate>
		<dc:creator>kurinchilamp</dc:creator>
				<category><![CDATA[Linux Server]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[php security measure]]></category>
		<category><![CDATA[php session fixation]]></category>
		<category><![CDATA[session]]></category>
		<category><![CDATA[session fixation]]></category>

		<guid isPermaLink="false">http://kurinchilamp.kurinchilion.com/?p=531</guid>
		<description><![CDATA[Session Fixation is method by which an intruder creates a session id which gets carried on when a user comes with that path and continues his/her activity on a website. For e.g. an intruder may create a link to a site called samplesite.com as &#60;a href=&#8221;http://samplesite.com/cart.php?PHPSESSID=Ax23mDud&#8221; /&#62;Sample Site&#60;a&#62; When a user clicks on this link [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Session Fixation </strong>is method by which an intruder creates a session id which gets carried on when a user comes with that path and continues his/her activity on a website.</p>
<p>For e.g. an intruder may create a link to a site called samplesite.com as &lt;a href=&#8221;http://samplesite.com/cart.php?PHPSESSID=Ax23mDud&#8221; /&gt;Sample Site&lt;a&gt;</p>
<p>When a user clicks on this link the session id gets carried on to the site &#8216;<em>samplesite.com</em>&#8216;. The intruder waits for the user starts to perform a transaction on the site and will take over vital details by intruding user&#8217;s activity on samplesite.com.<br />
<span id="more-531"></span><br />
<strong>How to prevent Session Fixation in PHP?</strong></p>
<p>i) Regenerate session id&#8217;s at every juncture where necessary (usage of session_regeneration_id() function)</p>
<p>ii) Avoid passing session id&#8217;s in GET/POST variables</p>
<p>iii) If you have a blacklisted referrer list, you can possibly compare the referrer before generating the session for each user. You can also check the referrer on the top of the program in the pages where session based activity is carried out</p>
<p>iv) Generate a session id from the server and check if the session id was generted from the server and if it is not empty. </p>
<p>v) Expire a session after a valid interval and never let it go unexpired.</p>
<p><em>Reference</em>: </p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Session_fixation" target="_blank">Wikipedia</a></li>
<li><a href="http://www.webappsec.org/projects/threat/classes/session_fixation.shtml" target="_blank">Webappsec</a></li>
<li><a href="http://shiflett.org/articles/session-fixation" target="_blank">shiflett.org</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://kurinchilamp.kurinchilion.com/2009/07/php-security-session-fixation-and-how-to-prevent-it.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is Kerberos Authentication System?</title>
		<link>http://kurinchilamp.kurinchilion.com/2009/07/what-is-kerberos-authentication-system.html</link>
		<comments>http://kurinchilamp.kurinchilion.com/2009/07/what-is-kerberos-authentication-system.html#comments</comments>
		<pubDate>Mon, 20 Jul 2009 13:58:49 +0000</pubDate>
		<dc:creator>kurinchilamp</dc:creator>
				<category><![CDATA[LINUX]]></category>
		<category><![CDATA[Linux Server]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[authentication process kerberos]]></category>
		<category><![CDATA[kerberos]]></category>
		<category><![CDATA[kerberos authentication]]></category>

		<guid isPermaLink="false">http://kurinchilamp.kurinchilion.com/?p=509</guid>
		<description><![CDATA[Kerberos Authentication is a means by which a communicating entity on a non-secure network can prove itself to another entity about its identity in a secured way. In a system developed for a client-server model, it is inconceivable to identify the threat posed by the network users and the intruders. Primary goal of Kerberos Authentication [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Kerberos Authentication</strong> is a means by which a communicating entity on a non-secure network can prove itself to another entity about its identity in a secured way.</p>
<p>In a system developed for a client-server model, it is inconceivable to identify the threat posed by the network users and the intruders.</p>
<p>Primary goal of Kerberos Authentication System is to prevent free text based transmission of passwords over the network. </p>
<p>Kerberos was created by MIT with a license similar to BSD and the current version is Version 5. It is implemented across various OS &#8211; Linux, Unix, Windows, MacOS.</p>
<p>Kerberos system is built on a symmetric key algorithm.<br />
<span id="more-509"></span><br />
<strong>How the Kerberos system works?</strong></p>
<p><em>Indicators:</em><br />
- User1 on Workstation WS<br />
- Key Distribution Center (KDC)<br />
- Ticket Granting Service (TGS)<br />
- Ticket Granting Ticket (TGT)</p>
<p><em>Logical Kerberos Database:</em><br />
User1 : Key1<br />
User2 : Key2<br />
Service1 : Key3<br />
User3 : Key4</p>
<p>Keys for users are derived from User&#8217;s password.</p>
<p><strong>Kerberos Communication Flow</strong><br />
1) User1 logs into the network from work station WS<br />
2) Principal is sent to Key Distribution Center KDC<br />
3) KDC checks its database for User1 and generates TGT if User1 is present in its database. TGT is encrypted with Key1 (key that is derived from users password)<br />
4) TGT is sent to WS from KDC<br />
5) In the workstation WS, the key is decrypted with the password entered from WS in order to derive the TGT. TGT is session based and is set to expire after its time limit.</p>
<p>For a Service that runs on a network, the client requests the TGT from Ticket Granting Service (TGS) which may run on the same server as KDC.</p>
]]></content:encoded>
			<wfw:commentRss>http://kurinchilamp.kurinchilion.com/2009/07/what-is-kerberos-authentication-system.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to turn off register_globals via php.ini?</title>
		<link>http://kurinchilamp.kurinchilion.com/2009/07/how-to-turn-off-register_globals-via-php-ini.html</link>
		<comments>http://kurinchilamp.kurinchilion.com/2009/07/how-to-turn-off-register_globals-via-php-ini.html#comments</comments>
		<pubDate>Thu, 16 Jul 2009 13:54:06 +0000</pubDate>
		<dc:creator>kurinchilamp</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[PHP security]]></category>
		<category><![CDATA[php.ini]]></category>
		<category><![CDATA[register globals]]></category>

		<guid isPermaLink="false">http://kurinchilamp.kurinchilion.com/?p=503</guid>
		<description><![CDATA[It is always secured to turn OFF register_globals in PHP applications. Earlier, we have seen how to turn OFF register_globals setting via .htaccess file and in this blog we will use php.ini instead. Using a text editor create a file called php.ini. This will be our first step. Next, we need to add the following [...]]]></description>
			<content:encoded><![CDATA[<p>It is always secured to turn OFF register_globals in PHP applications. Earlier, we have seen how to turn OFF register_globals setting via .htaccess file and in this blog we will use php.ini instead.</p>
<p>Using a text editor create a file called php.ini. This will be our first step.</p>
<p>Next, we need to add the following line of code in php.ini<br />
<strong>register_globals = off</strong></p>
<p>Upload php.ini file to the root folder where your application resides.</p>
]]></content:encoded>
			<wfw:commentRss>http://kurinchilamp.kurinchilion.com/2009/07/how-to-turn-off-register_globals-via-php-ini.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to restrict folder, file permission settings for each user?</title>
		<link>http://kurinchilamp.kurinchilion.com/2009/07/how-to-restrict-folder-file-permission-settings-for-each-user.html</link>
		<comments>http://kurinchilamp.kurinchilion.com/2009/07/how-to-restrict-folder-file-permission-settings-for-each-user.html#comments</comments>
		<pubDate>Tue, 14 Jul 2009 02:06:10 +0000</pubDate>
		<dc:creator>kurinchilamp</dc:creator>
				<category><![CDATA[LINUX]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tips, Tricks, Guides]]></category>
		<category><![CDATA[restrict folder access]]></category>
		<category><![CDATA[sticky bit]]></category>
		<category><![CDATA[t bit]]></category>

		<guid isPermaLink="false">http://kurinchilamp.kurinchilion.com/?p=491</guid>
		<description><![CDATA[Sticky bit There may be situation where you wanted all users to store files in a certain folder but might want to restrict users from deleting other users file. For this scenario, you can set the sticky bit of the folder which will serve our purpose. For example we have created a folder inside /tmp [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Sticky bit</strong></p>
<p>There may be situation where you wanted all users to store files in a certain folder but might want to restrict users from deleting other users file. For this scenario, you can set the sticky bit of the folder which will serve our purpose.</p>
<p>For example we have created a folder inside<strong> /tmp </strong>directory called &#8220;user&#8221;</p>
<p><strong>root@dev:/tmp# ls -l | tail -1</strong><br />
drwxr-xrwx 2 root     root    4096 2009-07-13 11:39 user<br />
<strong>root@dev:/tmp# cd user</strong></p>
<p>Now create a file called a.txt (you are currently with root privileges)<br />
<strong>root@dev:/tmp/user# touch a.txt</strong></p>
<p>Now change to the user with normal privileges (i have created a user called &#8216;usr100&#8242; for this purpose)<br />
<strong>usr100@dev:/tmp/user$ su usr100</strong><br />
password:<br />
<strong>usr100@dev:/tmp/user$ whoami</strong><br />
usr100<br />
<span id="more-491"></span><br />
<strong>usr100@dev:/tmp/user# touch b.txt<br />
usr100@dev:/tmp/user$ ls -ltr</strong><br />
total 4<br />
-rw-r&#8211;r&#8211; 1 root   root    0 2009-07-13 11:42 a.txt<br />
-rw-r&#8211;r&#8211; 1 usr100 usr100  0 2009-07-13 11:42 b.txt<br />
<strong>usr100@dev:/tmp/user$ rm -i a.txt</strong></p>
<p><strong>usr100@dev:/tmp/user$ ls -ltr</strong><br />
total 4<br />
-rw-r&#8211;r&#8211; 1 usr100 usr100  0 2009-07-13 11:42 b.txt</p>
<p>The file created by root user got deleted by usr100.</p>
<p>In  order to prevent this, set the sticky bit for the folder &#8216;user&#8217;</p>
<p><strong>usr100@dev:/tmp/user$ su root<br />
root@dev:/tmp# chmod +t user<br />
root@dev:/tmp# cd usr<br />
root@dev:/tmp/usr# touch a.txt<br />
root@dev:/tmp/usr# su usr100</strong><br />
<strong>usr100@dev:/tmp$ ls -ltr | tail -1</strong><br />
drwxr-xrwt 2 root     root    4096 2009-07-13 12:07 user</p>
<p><em>Notice &#8220;t&#8221; at the end of the permission settings which denote that the folder /user has been set with the sticky bit.</em></p>
<p><strong>usr100@dev:/tmp/user$ ls -ltr</strong><br />
total 0<br />
-rw-r&#8211;r&#8211; 1 usr100 usr100 0 2009-07-13 11:42 c.txt<br />
-rw-r&#8211;r&#8211; 1 root   root   0 2009-07-13 12:07 a.txt</p>
<p>Now try deleting the file a.txt created by root user<br />
<strong>usr100@dev:/tmp/user$ rm -i a.txt</strong><br />
rm: remove write-protected regular empty file `a.txt&#8217;? y<br />
rm: cannot remove `a.txt&#8217;: Operation not permitted</p>
<p>As the sticky bit is set for the folder &#8216;user&#8217;, usr100 is prevented from deleting the file created by &#8216;root&#8217; user</p>
]]></content:encoded>
			<wfw:commentRss>http://kurinchilamp.kurinchilion.com/2009/07/how-to-restrict-folder-file-permission-settings-for-each-user.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

