<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.slackwiki.com/index.php?action=history&amp;feed=atom&amp;title=Permissions_and_Umasks</id>
	<title>Permissions and Umasks - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.slackwiki.com/index.php?action=history&amp;feed=atom&amp;title=Permissions_and_Umasks"/>
	<link rel="alternate" type="text/html" href="https://www.slackwiki.com/index.php?title=Permissions_and_Umasks&amp;action=history"/>
	<updated>2026-04-08T02:58:29Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://www.slackwiki.com/index.php?title=Permissions_and_Umasks&amp;diff=568&amp;oldid=prev</id>
		<title>Rworkman: Reverted edits by Esmapebb (talk) to last revision by Erik</title>
		<link rel="alternate" type="text/html" href="https://www.slackwiki.com/index.php?title=Permissions_and_Umasks&amp;diff=568&amp;oldid=prev"/>
		<updated>2011-12-09T14:11:36Z</updated>

		<summary type="html">&lt;p&gt;Reverted edits by &lt;a href=&quot;/Special:Contributions/Esmapebb&quot; title=&quot;Special:Contributions/Esmapebb&quot;&gt;Esmapebb&lt;/a&gt; (&lt;a href=&quot;/index.php?title=User_talk:Esmapebb&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User talk:Esmapebb (page does not exist)&quot;&gt;talk&lt;/a&gt;) to last revision by &lt;a href=&quot;/User:Erik&quot; title=&quot;User:Erik&quot;&gt;Erik&lt;/a&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:11, 9 December 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Normal Permissions==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Normal Permissions==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;On *nix-like systems, traditionally &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;eery &lt;/del&gt;file has an owner, an assigned group, and a list of permissions (although POSIX Access Control Lists are getting more popular).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;On *nix-like systems, traditionally &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;every &lt;/ins&gt;file has an owner, an assigned group, and a list of permissions (although POSIX Access Control Lists are getting more popular).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You can change the owner of a file with the &amp;quot;chown&amp;quot; command:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You can change the owner of a file with the &amp;quot;chown&amp;quot; command:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Rworkman</name></author>
	</entry>
	<entry>
		<id>https://www.slackwiki.com/index.php?title=Permissions_and_Umasks&amp;diff=541&amp;oldid=prev</id>
		<title>Merge-delete at 10:19, 9 December 2011</title>
		<link rel="alternate" type="text/html" href="https://www.slackwiki.com/index.php?title=Permissions_and_Umasks&amp;diff=541&amp;oldid=prev"/>
		<updated>2011-12-09T10:19:48Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:19, 9 December 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Normal Permissions==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Normal Permissions==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;On *nix-like systems, traditionally &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;every &lt;/del&gt;file has an owner, an assigned group, and a list of permissions (although POSIX Access Control Lists are getting more popular).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;On *nix-like systems, traditionally &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;eery &lt;/ins&gt;file has an owner, an assigned group, and a list of permissions (although POSIX Access Control Lists are getting more popular).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You can change the owner of a file with the &amp;quot;chown&amp;quot; command:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You can change the owner of a file with the &amp;quot;chown&amp;quot; command:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Merge-delete</name></author>
	</entry>
	<entry>
		<id>https://www.slackwiki.com/index.php?title=Permissions_and_Umasks&amp;diff=39&amp;oldid=prev</id>
		<title>Erik: Manual copy of old data.</title>
		<link rel="alternate" type="text/html" href="https://www.slackwiki.com/index.php?title=Permissions_and_Umasks&amp;diff=39&amp;oldid=prev"/>
		<updated>2009-05-28T23:56:59Z</updated>

		<summary type="html">&lt;p&gt;Manual copy of old data.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Normal Permissions==&lt;br /&gt;
&lt;br /&gt;
On *nix-like systems, traditionally every file has an owner, an assigned group, and a list of permissions (although POSIX Access Control Lists are getting more popular).&lt;br /&gt;
&lt;br /&gt;
You can change the owner of a file with the &amp;quot;chown&amp;quot; command:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;code&amp;gt;fred@linux:~&amp;gt; chown someUser foo&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can change the group of a file with the &amp;quot;chgrp&amp;quot; command:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;code&amp;gt;fred@linux:~&amp;gt; chgrp someGroup foo&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can do both at once:&lt;br /&gt;
&lt;br /&gt;
: fred@linux:~&amp;gt; &amp;lt;code&amp;gt;chown someUser.someGroup foo&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or:&lt;br /&gt;
&lt;br /&gt;
: fred@linux:~&amp;gt; &amp;lt;code&amp;gt;chown someUser:someGroup foo&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For every file, you can set the following for the User, Group, and Others: r - can read w - can write x - can execute&lt;br /&gt;
&lt;br /&gt;
These are set with the &amp;quot;chmod&amp;quot; command:&lt;br /&gt;
&lt;br /&gt;
: fred@linux:~&amp;gt; &amp;lt;code&amp;gt;chmod u=rwx,g=rx,o=r foo&amp;lt;/code&amp;gt;&lt;br /&gt;
: fred@linux:~&amp;gt; &amp;lt;code&amp;gt;ls -l foo&amp;lt;/code&amp;gt;&lt;br /&gt;
: -rwxr-xr--  1 fred users 0 2004-10-26 11:38 foo&lt;br /&gt;
&lt;br /&gt;
You don't need to set all the permissions - you can just modify them, for example, to make a file executable:&lt;br /&gt;
&lt;br /&gt;
: fred@linux:~&amp;gt; &amp;lt;code&amp;gt;chmod +x foo&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also change the permissions just for either the User, Group, or Others:&lt;br /&gt;
&lt;br /&gt;
: fred@linux:~&amp;gt; &amp;lt;code&amp;gt;chmod o-x foo&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Octal Permissions==&lt;br /&gt;
&lt;br /&gt;
You can also specify permissions with a number. To find out which numbers, add up the numbers from this table:&lt;br /&gt;
&lt;br /&gt;
 r w x&lt;br /&gt;
 4 2 1&lt;br /&gt;
&lt;br /&gt;
For example, rwxr-xr-- would be:&lt;br /&gt;
&lt;br /&gt;
 U  G  O&lt;br /&gt;
 4  4  4&lt;br /&gt;
 +2 +0 +0&lt;br /&gt;
 +1 +1 +0&lt;br /&gt;
 =7 =5 =4&lt;br /&gt;
&lt;br /&gt;
So to give a file rwxr-xr-- permissions:&lt;br /&gt;
&lt;br /&gt;
: fred@linux:~&amp;gt; &amp;lt;code&amp;gt;chmod 754 foo&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Umasks==&lt;br /&gt;
&lt;br /&gt;
umasks define which permissions can not be set (in octal). For example, the default umask on slackware is 0022:&lt;br /&gt;
&lt;br /&gt;
: fred@laptop:~$ &amp;lt;code&amp;gt;umask&amp;lt;/code&amp;gt;&lt;br /&gt;
: 0022&lt;br /&gt;
&lt;br /&gt;
Ignoring the first digit, this means that the owner can do anything, but group and others are unable to write (2 == w). A more secure umask (possibly more suitable for your ~/) is 0077, meaning that group and others have no access to your files.&lt;br /&gt;
&lt;br /&gt;
==More Umask==&lt;br /&gt;
&lt;br /&gt;
The following is based on [[User:Sandman1|Sandman1]]'s Umask tutorial.&lt;br /&gt;
&lt;br /&gt;
Well first this is a pretty boring topic to write about, So im going to get right to the point. When you set a umask you set what permission NOT to set. So when you create a file it uses the umask to set the file permissions. All of this might not make sense now but it will later. Now type:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;code&amp;gt;umask&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now on slackware you will get &amp;quot;0022&amp;quot;, First ignore the first 0. Now we have 022. The first 0 makes sure the owner has ALL the permissions of a file. You can tell that becuase you have no permissions you want to turn off. Now the next two numbers you have a 2 for. The 2 indicates that you NEVER want to set write permissions.&lt;br /&gt;
&lt;br /&gt;
Now that method above of trying to find a umask is a bit confusing. All you do is set the number what you DON'T want the user to have. Now there is an easier way of finding out a umask. You can subtract the permission from 777. Example:&lt;br /&gt;
&lt;br /&gt;
 777 - 750 = 027&lt;br /&gt;
&lt;br /&gt;
That is the umask of the 750 permission. Now you may be asking yourself what is this usefull for. Well you can set the umask by typing &amp;quot;umask 027&amp;quot; in bash and when you create a file/directory it goes by umask 027 instead of the 0022.&lt;br /&gt;
&lt;br /&gt;
Now another reason for setting a umask is becuase you want to access a filesystem such as NTFS,VFAT,Samba,etc as a regular user. You can set the umask and allow regular users to write to the filesytem. It is really easy, in the fstab all you add is &amp;quot;umask=027&amp;quot; and remount the filesystem.&lt;br /&gt;
See [[Windows_Partitions]] for more information (and a potentially better option than setting umask options).&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Erik</name></author>
	</entry>
</feed>