<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
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/"
> <channel><title>Comments on: What is Umask and How To Setup Default umask Under Linux?</title> <atom:link href="http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html/feed" rel="self" type="application/rss+xml" /><link>http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html</link> <description>This is a Linux sys admin journal by Vivek about sys admin work, Linux tips &#38; tricks, hacks, news and more.</description> <lastBuildDate>Fri, 10 Feb 2012 20:37:43 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: Vivek Gite</title><link>http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-178944</link> <dc:creator>Vivek Gite</dc:creator> <pubDate>Wed, 25 Jan 2012 15:17:35 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-178944</guid> <description>Thanks for the heads up.</description> <content:encoded><![CDATA[<p>Thanks for the heads up.</p> ]]></content:encoded> </item> <item><title>By: Jim Trigg</title><link>http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-178936</link> <dc:creator>Jim Trigg</dc:creator> <pubDate>Tue, 24 Jan 2012 20:50:58 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-178936</guid> <description>The final table has three errors.  The first three rows calculate &quot;7 - 2 = 4&quot; where they should calculate &quot;7 - 2 = 5&quot;.  So the values in the final column should be 755, 751, 750, 700.</description> <content:encoded><![CDATA[<p>The final table has three errors.  The first three rows calculate &#8220;7 &#8211; 2 = 4&#8243; where they should calculate &#8220;7 &#8211; 2 = 5&#8243;.  So the values in the final column should be 755, 751, 750, 700.</p> ]]></content:encoded> </item> <item><title>By: usman maan</title><link>http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-178211</link> <dc:creator>usman maan</dc:creator> <pubDate>Sun, 08 Jan 2012 17:35:12 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-178211</guid> <description>hi............
how to change umask value permanently in opensuse linux??????
plz reply......fast as u can.........
thnxxxxxxxxx</description> <content:encoded><![CDATA[<p>hi&#8230;&#8230;&#8230;&#8230;<br
/> how to change umask value permanently in opensuse linux??????<br
/> plz reply&#8230;&#8230;fast as u can&#8230;&#8230;&#8230;<br
/> thnxxxxxxxxx</p> ]]></content:encoded> </item> <item><title>By: milli</title><link>http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-177029</link> <dc:creator>milli</dc:creator> <pubDate>Wed, 14 Dec 2011 18:27:34 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-177029</guid> <description>how can we change the Default value of Umask permanently?????
help me.....</description> <content:encoded><![CDATA[<p>how can we change the Default value of Umask permanently?????<br
/> help me&#8230;..</p> ]]></content:encoded> </item> <item><title>By: illimar</title><link>http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-175914</link> <dc:creator>illimar</dc:creator> <pubDate>Tue, 22 Nov 2011 17:03:50 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-175914</guid> <description>Hey, can You please tell me how do I set umask for a certain user under Ubuntu? I do not want to set a global umask.</description> <content:encoded><![CDATA[<p>Hey, can You please tell me how do I set umask for a certain user under Ubuntu? I do not want to set a global umask.</p> ]]></content:encoded> </item> <item><title>By: vulna</title><link>http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-175593</link> <dc:creator>vulna</dc:creator> <pubDate>Fri, 11 Nov 2011 07:24:19 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-175593</guid> <description>Hi,
how can i set permission for folder which mount to drive to each user can not delete or modify other&#039;s file and folder?
For instance in fstab:
/dev/sdb1 /any_where vfat uid=...,gid=...,&lt;strong&gt;umask=0002&lt;/strong&gt; 0 0
Like as we use &lt;strong&gt;chmod -R +t folder&lt;/strong&gt; to set permission to folder look like: drwxr-xr-&lt;strong&gt;t&lt;/strong&gt;
So where and what i have to add parameter?
Thanks.</description> <content:encoded><![CDATA[<p>Hi,<br
/> how can i set permission for folder which mount to drive to each user can not delete or modify other&#8217;s file and folder?<br
/> For instance in fstab:<br
/> /dev/sdb1 /any_where vfat uid=&#8230;,gid=&#8230;,<strong>umask=0002</strong> 0 0<br
/> Like as we use <strong>chmod -R +t folder</strong> to set permission to folder look like: drwxr-xr-<strong>t</strong><br
/> So where and what i have to add parameter?<br
/> Thanks.</p> ]]></content:encoded> </item> <item><title>By: vijay</title><link>http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-175491</link> <dc:creator>vijay</dc:creator> <pubDate>Mon, 07 Nov 2011 03:57:26 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-175491</guid> <description>what is yhe u mask vllue for dir</description> <content:encoded><![CDATA[<p>what is yhe u mask vllue for dir</p> ]]></content:encoded> </item> <item><title>By: Ashish</title><link>http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-175274</link> <dc:creator>Ashish</dc:creator> <pubDate>Thu, 27 Oct 2011 16:59:34 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-175274</guid> <description>Hello boilermaker,
I guess you have asked the same question, above in the same article...still you are not satisfied let me know about it...I will help you out..</description> <content:encoded><![CDATA[<p>Hello boilermaker,</p><p>I guess you have asked the same question, above in the same article&#8230;still you are not satisfied let me know about it&#8230;I will help you out..</p> ]]></content:encoded> </item> <item><title>By: boilermaker</title><link>http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-175273</link> <dc:creator>boilermaker</dc:creator> <pubDate>Thu, 27 Oct 2011 16:49:21 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-175273</guid> <description>Hey Ashish
Say the umask is 027. How would you apply that to determine file permissions?</description> <content:encoded><![CDATA[<p>Hey Ashish<br
/> Say the umask is 027. How would you apply that to determine file permissions?</p> ]]></content:encoded> </item> <item><title>By: boilermaker</title><link>http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-174779</link> <dc:creator>boilermaker</dc:creator> <pubDate>Wed, 12 Oct 2011 16:19:27 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-174779</guid> <description>Now there&#039;s an explanation which makes total sense :)
Thanks Vivek, for inaugurating the topic. And thanks kurinchi blogger for explaining it fully.
I was getting hung up on Vivek&#039;s post where he says - to calculate file permissions, subtract umask from 666 - the default permission for file. Except that sometimes umasks can be like 027, in which case you get a -ve number in the last octal?
&quot;You can simply subtract the umask from the base permissions to determine the final permission for file as follows:
666 - 022 = 644&quot;</description> <content:encoded><![CDATA[<p>Now there&#8217;s an explanation which makes total sense :)<br
/> Thanks Vivek, for inaugurating the topic. And thanks kurinchi blogger for explaining it fully.<br
/> I was getting hung up on Vivek&#8217;s post where he says &#8211; to calculate file permissions, subtract umask from 666 &#8211; the default permission for file. Except that sometimes umasks can be like 027, in which case you get a -ve number in the last octal?<br
/> &#8220;You can simply subtract the umask from the base permissions to determine the final permission for file as follows:<br
/> 666 &#8211; 022 = 644&#8243;</p> ]]></content:encoded> </item> <item><title>By: freddie barron</title><link>http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-174415</link> <dc:creator>freddie barron</dc:creator> <pubDate>Wed, 28 Sep 2011 09:03:21 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-174415</guid> <description>Ashish Jaiswal i agree with you 100%  Then directory permission should always be 777 – 022 so i.e 755 while the file permission should be  666 – 022 so i.e 644</description> <content:encoded><![CDATA[<p>Ashish Jaiswal i agree with you 100%  Then directory permission should always be 777 – 022 so i.e 755 while the file permission should be  666 – 022 so i.e 644</p> ]]></content:encoded> </item> <item><title>By: Ashish Jaiswal</title><link>http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-174226</link> <dc:creator>Ashish Jaiswal</dc:creator> <pubDate>Thu, 22 Sep 2011 06:50:34 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-174226</guid> <description>There is a basic simple idea to calculate the umask
1) For file permission it is 666
2) For Directory Permission it is 777
So any umask setting is there just subtract it from the above mentioned values.
As an example
umask is set as 022
Then directory permission would be 777 - 022 so i.e 755
and file permission would be like 666 - 022 so i.e 644
As simple as this
you can put this value in /etc/bashrc /etc/login.defs or ./bashrc
Please post me if you have any more doubts on this</description> <content:encoded><![CDATA[<p>There is a basic simple idea to calculate the umask</p><p>1) For file permission it is 666<br
/> 2) For Directory Permission it is 777</p><p>So any umask setting is there just subtract it from the above mentioned values.</p><p>As an example</p><p>umask is set as 022</p><p>Then directory permission would be 777 &#8211; 022 so i.e 755<br
/> and file permission would be like 666 &#8211; 022 so i.e 644</p><p>As simple as this</p><p>you can put this value in /etc/bashrc /etc/login.defs or ./bashrc</p><p>Please post me if you have any more doubts on this</p> ]]></content:encoded> </item> <item><title>By: Lawson</title><link>http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-173784</link> <dc:creator>Lawson</dc:creator> <pubDate>Thu, 08 Sep 2011 18:19:05 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-173784</guid> <description>I love this post keep it up please  i need more tutorials about this cause i jst learnt it thanks!</description> <content:encoded><![CDATA[<p>I love this post keep it up please  i need more tutorials about this cause i jst learnt it thanks!</p> ]]></content:encoded> </item> <item><title>By: Bishnu</title><link>http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-173754</link> <dc:creator>Bishnu</dc:creator> <pubDate>Wed, 07 Sep 2011 16:18:56 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-173754</guid> <description>Very Useful. Thanks a lot.</description> <content:encoded><![CDATA[<p>Very Useful. Thanks a lot.</p> ]]></content:encoded> </item> <item><title>By: Kiteman</title><link>http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-172076</link> <dc:creator>Kiteman</dc:creator> <pubDate>Thu, 23 Jun 2011 07:56:09 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-172076</guid> <description>Hi,
How to implement a umask when using a program in a batch mode, when .profile or .bashrc is not loaded ?
Thanks for your help.
Regards.</description> <content:encoded><![CDATA[<p>Hi,</p><p>How to implement a umask when using a program in a batch mode, when .profile or .bashrc is not loaded ?</p><p>Thanks for your help.</p><p>Regards.</p> ]]></content:encoded> </item> <item><title>By: sameerdhiman</title><link>http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-169905</link> <dc:creator>sameerdhiman</dc:creator> <pubDate>Wed, 16 Mar 2011 07:59:52 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-169905</guid> <description>Thank you for such a short and to the point write up. This helped a lot.
Thanks again.</description> <content:encoded><![CDATA[<p>Thank you for such a short and to the point write up. This helped a lot.</p><p>Thanks again.</p> ]]></content:encoded> </item> <item><title>By: themoon49</title><link>http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-169378</link> <dc:creator>themoon49</dc:creator> <pubDate>Tue, 01 Mar 2011 16:59:38 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-169378</guid> <description>Hay Post&#039;s owner thanks for your explaining</description> <content:encoded><![CDATA[<p>Hay Post&#8217;s owner thanks for your explaining</p> ]]></content:encoded> </item> <item><title>By: Deepak</title><link>http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-169184</link> <dc:creator>Deepak</dc:creator> <pubDate>Fri, 25 Feb 2011 13:30:17 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-169184</guid> <description>You are right. I had this doubt and was going over and over more than once. It is a typo.</description> <content:encoded><![CDATA[<p>You are right. I had this doubt and was going over and over more than once. It is a typo.</p> ]]></content:encoded> </item> <item><title>By: pdk</title><link>http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-169168</link> <dc:creator>pdk</dc:creator> <pubDate>Fri, 25 Feb 2011 06:57:39 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-169168</guid> <description>In your last example, if umask value is 077 and default permission is 777 then the newly created value should have permission 700, that is the the file should be rwx by the owner, but in your case the permission bits 600.
IN the table, the last entry if umask value is 0027 and default value is 777, then the file should have permission 750 i.e. group should have read and execute permission ,but you wrote r/w permission.
Correct me if I am wrong.</description> <content:encoded><![CDATA[<p>In your last example, if umask value is 077 and default permission is 777 then the newly created value should have permission 700, that is the the file should be rwx by the owner, but in your case the permission bits 600.</p><p>IN the table, the last entry if umask value is 0027 and default value is 777, then the file should have permission 750 i.e. group should have read and execute permission ,but you wrote r/w permission.</p><p>Correct me if I am wrong.</p> ]]></content:encoded> </item> <item><title>By: yer32</title><link>http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-161542</link> <dc:creator>yer32</dc:creator> <pubDate>Sat, 27 Nov 2010 14:48:11 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html#comment-161542</guid> <description>the math involved with umask need to be done in bin not octal base. here it is
Example:
apply umask 033 to default file permissions.
default file permissions 666
default folder permissions 777
0666 = 000.110.110.110
0033 = 000.000.011.011
make complement of 0033 (consist in change all 0 to 1 and all 1 to 0)
complement of 0033 = 111.111.100.100
no apply AND between the default permission and the complement
(AND result 1 when both are 1 or 0 if any are 0)
default perms of 666 = 000.110.110.110
complement of 0033 = 111.111.100.100
-----------------------------------------------------------------
AND result              = 000.110.100.100
now convert the result to octal
0.6.4.4
644
this is to show that the operation is not using octal, it is using binary instead.</description> <content:encoded><![CDATA[<p>the math involved with umask need to be done in bin not octal base. here it is<br
/> Example:<br
/> apply umask 033 to default file permissions.<br
/> default file permissions 666<br
/> default folder permissions 777<br
/> 0666 = 000.110.110.110<br
/> 0033 = 000.000.011.011<br
/> make complement of 0033 (consist in change all 0 to 1 and all 1 to 0)<br
/> complement of 0033 = 111.111.100.100<br
/> no apply AND between the default permission and the complement<br
/> (AND result 1 when both are 1 or 0 if any are 0)<br
/> default perms of 666 = 000.110.110.110<br
/> complement of 0033 = 111.111.100.100<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br
/> AND result              = 000.110.100.100</p><p>now convert the result to octal<br
/> 0.6.4.4<br
/> 644<br
/> this is to show that the operation is not using octal, it is using binary instead.</p> ]]></content:encoded> </item> </channel> </rss>
