<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.ccn.ucla.edu/wiki/index.php?action=history&amp;feed=atom&amp;title=UNIX_Permissions</id>
	<title>UNIX Permissions - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.ccn.ucla.edu/wiki/index.php?action=history&amp;feed=atom&amp;title=UNIX_Permissions"/>
	<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=UNIX_Permissions&amp;action=history"/>
	<updated>2026-05-06T09:08:41Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=UNIX_Permissions&amp;diff=3472&amp;oldid=prev</id>
		<title>Dmargolis: /* Further reading. . . */</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=UNIX_Permissions&amp;diff=3472&amp;oldid=prev"/>
		<updated>2017-08-11T18:29:49Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Further reading. . .&lt;/span&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 18:29, 11 August 2017&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-l176&quot;&gt;Line 176:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 176:&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;*The original [http://www.perlfect.com/articles/chmod.shtml article]&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;*The original [http://www.perlfect.com/articles/chmod.shtml article]&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;div&gt;*It is a good idea to take a look at the manual page for chmod (you can do this with man chmod) where you will find out more details and options on how to set permissions, plus some other kinds of permissions that we avoided to discuss here for the sake of simplicity and clarity.&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;*It is a good idea to take a look at the manual page for chmod (you can do this with man chmod) where you will find out more details and options on how to set permissions, plus some other kinds of permissions that we avoided to discuss here for the sake of simplicity and clarity.&lt;/div&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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*The first 1/2 of this [http://www.dartmouth.edu/~rc/help/faq/permissions.html Dartmouth Tutorial] is good&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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;*An exhaustively complete tutorial for the [http://www.catcode.com/teachmod/ chmod] utility including examples, mini quizzes, and more&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;*An exhaustively complete tutorial for the [http://www.catcode.com/teachmod/ chmod] utility including examples, mini quizzes, and more&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;div&gt;*The venerable Sultans of Tech, O&amp;#039;Reilly, have also written up a [http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html tutorial] for us&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;*The venerable Sultans of Tech, O&amp;#039;Reilly, have also written up a [http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html tutorial] for us&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Dmargolis</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=UNIX_Permissions&amp;diff=165&amp;oldid=prev</id>
		<title>Ccn admin: 38 revisions</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=UNIX_Permissions&amp;diff=165&amp;oldid=prev"/>
		<updated>2014-01-16T03:10:15Z</updated>

		<summary type="html">&lt;p&gt;38 revisions&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Information contained within this entry is heavily based on Perifect&amp;#039;s article&lt;br /&gt;
 [http://www.perlfect.com/articles/chmod.shtml Understanding UNIX and chmod].&lt;br /&gt;
&lt;br /&gt;
 OSX: There are some differences in the way osx handles permissions from other UNIX&amp;#039;s.&lt;br /&gt;
 However, the following should be accurate for all lab members on the Hoffman2 cluster.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
There are three levels of ownership and three levels of permission that you need to know.&lt;br /&gt;
&lt;br /&gt;
[[File:Unix-Permission.gif]]&lt;br /&gt;
&lt;br /&gt;
==Ownership==&lt;br /&gt;
Every file in UNIX has an &amp;lt;b&amp;gt;owner user&amp;lt;/b&amp;gt; and an &amp;lt;b&amp;gt;owner group&amp;lt;/b&amp;gt;.&lt;br /&gt;
 Only the owner of a file can change its permissions (Unless you are an Admin)&lt;br /&gt;
&lt;br /&gt;
====Owner====&lt;br /&gt;
Owner = you, the user. UNIX identifies each user by a User ID (UID) and the username (or login) such as &amp;#039;nick&amp;#039; and &amp;#039;bobby&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
====Group====&lt;br /&gt;
Groups = your buddies.  A user may belong to one or more groups of users. The concept of groups serves the purpose of assigning sets of privileges for a given resource and sharing them among many users that need to have them. (perhaps because they are all members of a project working team and they all need access to some common project files) So, on my system user &amp;#039;nick&amp;#039; and user &amp;#039;bobby&amp;#039; both belong to the group &amp;#039;perllab&amp;#039;. This way, they can have some shared privileges over the files for this lab&amp;#039;s projects. User &amp;#039;nick&amp;#039; needs the files to contribute to the project, and user &amp;#039;bobby&amp;#039; needs them to contribute to nick&amp;#039;s work.&lt;br /&gt;
&lt;br /&gt;
:To Find out what group you are in, use [[UNIX_Permissions#id]].&lt;br /&gt;
&lt;br /&gt;
====Other====&lt;br /&gt;
Others = the random guys. They represent anybody on the system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Permissions==&lt;br /&gt;
Security for your files and directories.&lt;br /&gt;
&lt;br /&gt;
===Files===&lt;br /&gt;
Every file on the system has associated with it a set of permissions. Permissions tell UNIX what can be done with that file and by whom. There are three things you can (or can&amp;#039;t) do with a given file:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;r&amp;lt;/b&amp;gt;ead it, gain access to looking into file&lt;br /&gt;
*&amp;lt;b&amp;gt;w&amp;lt;/b&amp;gt;rite (modify) it and change things in the file&lt;br /&gt;
*e&amp;lt;b&amp;gt;x&amp;lt;/b&amp;gt;ecute it, to run as a program&lt;br /&gt;
&lt;br /&gt;
Unix permissions specify which of the above operations can be performed for any ownership relation with respect to the file. In simpler terms, what can the owner do, what can the owner group do, and what can everybody else do with the file. For any given ownership relation, we need three bits to specify access permissions: the first to denote read (r) access, the second to denote (w) access and the third to denote execute (x) access. We have three ownership relations: &amp;#039;owner&amp;#039;, &amp;#039;group&amp;#039; and &amp;#039;all&amp;#039; so we need a triplet for each, resulting in nine bits. Each bit can be &amp;lt;i&amp;gt;set&amp;lt;/i&amp;gt; or &amp;lt;i&amp;gt;clear&amp;lt;/i&amp;gt;. (not set) We mark a set bit by it&amp;#039;s corresponding operation letter (r, w or x) and a clear bit by a dash (-) and put them all on a row. An example might be rwxr-xr-x.What this means is that the owner can do anything with the file, but group owners and the rest of the world can only read or execute it. Usually in UNIX there is also another bit that precedes this 9-bit pattern. You do not need to know about it, at least for the time being.&lt;br /&gt;
&lt;br /&gt;
===Directories===&lt;br /&gt;
Another interesting thing to note is that lib/ which is a directory has permissions, too. Permissions take a different meaning for directories. Here&amp;#039;s what they mean:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;r&amp;lt;/b&amp;gt;ead determines if a user can view the directory&amp;#039;s contents, i.e. do ls in it.&lt;br /&gt;
*&amp;lt;b&amp;gt;w&amp;lt;/b&amp;gt;rite determines if a user can create new files or delete file in the directory. (Note here that this essentially means that a user with write access to a directory can delete files in the directory even if he/she doesn&amp;#039;t have write permissions for the file! So be careful with this.) &lt;br /&gt;
*e&amp;lt;b&amp;gt;x&amp;lt;/b&amp;gt;ecute determines if the user can cd into the directory.&lt;br /&gt;
&lt;br /&gt;
: To Find out the permission, use [[UNIX_Permissions#ls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Tools=&lt;br /&gt;
These Unix Tools will help you out when you want to modify permissions.&lt;br /&gt;
&lt;br /&gt;
===ls===&lt;br /&gt;
If you try ls -l on the command prompt you will get something like the following:&lt;br /&gt;
 [nick@thekla src]$ ls -l&lt;br /&gt;
 -rwxr-xr-x   1 nick     users          382 Jan 19 11:49 bscoped.pl&lt;br /&gt;
 drwxr-xr-x   3 nick     users         1024 Jan 19 11:19 lib/&lt;br /&gt;
 -rwxr-xr-x   1 nick     users         1874 Jan 19 10:23 socktest.pl&lt;br /&gt;
&lt;br /&gt;
The first column here shows the permission bit pattern for each file. The third column shows the owner, and the fourth column shows the owner group. By the time, the information provided by ls -l should be enough for you to figure out what each user of the system can do with any of the files in the directory.&lt;br /&gt;
&lt;br /&gt;
[[File:Unix-Permission.png]]&lt;br /&gt;
&lt;br /&gt;
===chmod===&lt;br /&gt;
To set/modify a file&amp;#039;s permissions you need to use the chmod program. Of course, only the owner of a file may use chmod to alter a file&amp;#039;s permissions. chmod has the following syntax: &lt;br /&gt;
 chmod [options] mode file(s)&lt;br /&gt;
The &amp;#039;mode&amp;#039; part specifies the new permissions for the file(s) that follow as arguments. A mode specifies which user&amp;#039;s permissions should be changed, and afterwards which access types should be changed. Let&amp;#039;s say for example:&lt;br /&gt;
 chmod a-x socktest.pl&lt;br /&gt;
This means that the e&amp;lt;b&amp;gt;x&amp;lt;/b&amp;gt;ecute bit should be cleared (-) for &amp;lt;b&amp;gt;a&amp;lt;/b&amp;gt;ll users. (owner, group and the rest of the world) The permissions start with a letter specifying what users should be affected by the change, this might be any of the following:&lt;br /&gt;
*&amp;lt;b&amp;gt;u&amp;lt;/b&amp;gt; the owner user&lt;br /&gt;
*&amp;lt;b&amp;gt;g&amp;lt;/b&amp;gt; the owner group&lt;br /&gt;
*&amp;lt;b&amp;gt;o&amp;lt;/b&amp;gt; others (neither u, nor g)&lt;br /&gt;
*&amp;lt;b&amp;gt;a&amp;lt;/b&amp;gt; all users (u, g, &amp;amp; o)&lt;br /&gt;
&lt;br /&gt;
This is followed by a change instruction which consists of a +(set bit) or -(clear bit) and the letter corresponding to the bit that should be changed.&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s see some examples:&lt;br /&gt;
 $ ls -l socktest.pl &lt;br /&gt;
 -rwxr-xr-x   1 nick     users         1874 Jan 19 10:23 socktest.pl*&lt;br /&gt;
&lt;br /&gt;
Now let&amp;#039;s remove the e&amp;lt;b&amp;gt;x&amp;lt;/b&amp;gt;ecutable bit for &amp;lt;b&amp;gt;a&amp;lt;/b&amp;gt;ll users&lt;br /&gt;
 $ chmod a-x socktest.pl &lt;br /&gt;
 $ ls -l socktest.pl &lt;br /&gt;
 -rw-r--r--   1 nick     users         1874 Jan 19 10:23 socktest.pl&lt;br /&gt;
Then set the &amp;lt;b&amp;gt;w&amp;lt;/b&amp;gt;rite bit for the owner &amp;lt;b&amp;gt;g&amp;lt;/b&amp;gt;roup&lt;br /&gt;
 $ chmod g+w socktest.pl &lt;br /&gt;
 $ ls -l socktest.pl &lt;br /&gt;
 -rw-rw-r--   1 nick     users         1874 Jan 19 10:23 socktest.pl&lt;br /&gt;
And add the e&amp;lt;b&amp;gt;x&amp;lt;/b&amp;gt;&amp;gt;ecutable permission for both the &amp;lt;b&amp;gt;u&amp;lt;/b&amp;gt;ser owner and the &amp;lt;g&amp;gt;roup owner&lt;br /&gt;
 $ chmod ug+x socktest.pl &lt;br /&gt;
 $ ls -l socktest.pl  &lt;br /&gt;
 -rwxrwxr--   1 nick     users         1874 Jan 19 10:23 socktest.pl*&lt;br /&gt;
Finally, remove both the &amp;lt;b&amp;gt;w&amp;lt;/b&amp;gt;rite bit and the e&amp;lt;b&amp;gt;x&amp;lt;/b&amp;gt;ecutable bit for both the &amp;lt;b&amp;gt;u&amp;lt;/b&amp;gt;ser and &amp;lt;b&amp;gt;g&amp;lt;/b&amp;gt;roup owners&lt;br /&gt;
 $ chmod ug-wx socktest.pl &lt;br /&gt;
 $ ls -l socktest.pl &lt;br /&gt;
 -r--r--r--   1 nick     users         1874 Jan 19 10:23 socktest.pl&lt;br /&gt;
====Strange numbers...====&lt;br /&gt;
You might have encountered things like chmod 755 somefile and of course you will be wondering what this is. The thing is, that you can change the entire permission pattern of a file in one go using one number like the one in this example. Every mode has a corresponding code number, and as we shall see there is a very simple way to figure out what number corresponds to any mode.&lt;br /&gt;
&lt;br /&gt;
Every one of the three digits on the mode number corresponds to one of the three permission triplets. (u, g and o) Every permission bit in a triplet corresponds to a value: 4 for r, 2 for w, 1 for x. If the permission bit you add this value to the number of the permission triplet. If it is cleared, then you add nothing. (Some of you might notice that in fact, the number for a triplet is the octal value corresponding to the three-bit pattern - if you don&amp;#039;t know what an octal value is, it doesn&amp;#039;t really matter, just follow the intstructions) So if a file has rwxr-xr-x permissions we do the following calculation:&lt;br /&gt;
 Triplet for u: rwx =&amp;gt; 4 + 2 + 1 = 7&lt;br /&gt;
 Triplet for g: r-x =&amp;gt; 4 + 0 + 1 = 5&lt;br /&gt;
 Tripler for o: r-x =&amp;gt; 4 + 0 + 1 = 5&lt;br /&gt;
 Which makes : 755&lt;br /&gt;
&lt;br /&gt;
So, 755 is a terse way to say &amp;lt;i&amp;gt;&amp;#039;I don&amp;#039;t mind if other people read or run this file, but only I should be able to modify it&amp;#039; and 777 means &amp;#039;everyone has full access to this file&amp;#039;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===chgrp===&lt;br /&gt;
As the name may imply to the astute, this utility changes the group of a file or directory. A user &amp;lt;i&amp;gt;may only change a files group to a group for which they are a member&amp;lt;/i&amp;gt;. chgrp syntax is:&lt;br /&gt;
 $ chgrp &amp;lt;groupname&amp;gt; &amp;lt;file or directory name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example case might look like this:&lt;br /&gt;
Suzie is a member of both groups perllab and rubylab. She&amp;#039;s collaborating with Que, a member of rubylab. Unfortunately, the files she wishes to share have a group owner of perllab and Que cannot read them. Fortunately, since Suzie is also a member of rubylab she can remedy this easily with chgrp.&lt;br /&gt;
 $ chgrp rubylab project_directory&lt;br /&gt;
&lt;br /&gt;
She might also need to change the directories permissions to ensure that the group owner can use the files&lt;br /&gt;
 $ chmod g+rwX project_directory&lt;br /&gt;
&lt;br /&gt;
If Suzie wanted to ensure that all files contained in project_directory, she&amp;#039;d execute the following recursive commands (which should look familiar given the chmod examples above.)&lt;br /&gt;
 $ chgrp -R rubylab project_directory&lt;br /&gt;
 $ chmod -R g+rwX project_directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===umask===&lt;br /&gt;
Each user has a default set of permissions which apply to all files created by that user, unless the software explicitly sets something else. This is often called the &amp;lt;i&amp;gt;umask&amp;lt;/i&amp;gt;, after the command used to change it. It is either inherited from the login process, or set in the .bash_profile file which configures an individual account, or it can be run manually. &lt;br /&gt;
&lt;br /&gt;
On the Hoffman2 server, this is set to only allow read/write permissions to the user, while group and other&amp;#039;s are given permission to read, but not write to new files.&lt;br /&gt;
&lt;br /&gt;
If you wish to more lax permissions, you must change your umask in your .bash_profile or manually each time you wish to change them. Setting the umask is not immediately intuitive. As the name implies, the argument to umask are the bits you &amp;lt;i&amp;gt;do not want set&amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
An examples:&lt;br /&gt;
*To make it so all new files give all permissions to the owner, read permission to the group, and no permissions to others&lt;br /&gt;
 $ umask 027&lt;br /&gt;
&lt;br /&gt;
We have not masked any bits by passing the 0 in the first slot, we have masked (removed) the write permission for all group members by passing the &amp;#039;2&amp;#039; to the second slot, and we&amp;#039;ve masked all possible bits for others by passing &amp;#039;7&amp;#039; to the third slot.&lt;br /&gt;
&lt;br /&gt;
Here are a few more examples that cover the most common cases:&lt;br /&gt;
*To allow the user and the group to read, write, or execute new files&lt;br /&gt;
 $ umask 007&lt;br /&gt;
*To allow only the user to read or write or execute new files (highest privacy)&lt;br /&gt;
 $ umask 077&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===newgrp===&lt;br /&gt;
There is also a handy utility called &amp;lt;b&amp;gt;newgrp&amp;lt;/b&amp;gt; that eases permission problems. The newgrp utility changes the default group ownership for new files. For example, &lt;br /&gt;
 $ id foo&lt;br /&gt;
 uid=8122(foo) gid=4004(staff) groups=4004(staff),1901(webadmin)&lt;br /&gt;
&lt;br /&gt;
The user &amp;#039;foo&amp;#039; is a member of the webadmin and the staff groups. Her gid is currently &amp;#039;staff&amp;#039;. This means that any new file she creates will belong to the staff group. &lt;br /&gt;
&lt;br /&gt;
But when foo wishes to work with web files, it would make things much easier for all of the other members of the webadmin group if the files she created had a group ownership of webadmin. It would also be much easier for foo if she did not have to worry about doing a&lt;br /&gt;
 $ chgrp webadmin newfile.html &lt;br /&gt;
&lt;br /&gt;
For every file she creates. This is where newgrp comes in. By issueing the following command &amp;lt;i&amp;gt;before&amp;lt;/i&amp;gt; she begins to work, she can ensure that all newly created files are owned by the webadmin group.&lt;br /&gt;
&lt;br /&gt;
 $ newgrp webadmin&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s it! She may also wish to retain the more restrictive permissions of read only group access by default but in the case of doing collaborative work change that to a group read/write permissions. By combining newgrp with umask this is a very easy task.&lt;br /&gt;
&lt;br /&gt;
 $ umask 007&lt;br /&gt;
&lt;br /&gt;
This needs to be executed &amp;lt;i&amp;gt;after&amp;lt;/i&amp;gt; newgrp to take effect. Issueing the newgrp command sets your environment back to its defaults.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===id===&lt;br /&gt;
You can find out the full list of groups that a user belongs to with the following command&lt;br /&gt;
&lt;br /&gt;
 $ id bobby&lt;br /&gt;
&lt;br /&gt;
Of course, &amp;#039;bobby&amp;#039; should be replaced with the name of the user you&amp;#039;re interested in. It&amp;#039;s a very common task to check which groups two users are in so you may assign that common group to a file and allow both of them to read/write/edit the file. We&amp;#039;ll find out how to do just that shortly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Further reading. . .=&lt;br /&gt;
*The original [http://www.perlfect.com/articles/chmod.shtml article]&lt;br /&gt;
*It is a good idea to take a look at the manual page for chmod (you can do this with man chmod) where you will find out more details and options on how to set permissions, plus some other kinds of permissions that we avoided to discuss here for the sake of simplicity and clarity.&lt;br /&gt;
*The first 1/2 of this [http://www.dartmouth.edu/~rc/help/faq/permissions.html Dartmouth Tutorial] is good&lt;br /&gt;
*An exhaustively complete tutorial for the [http://www.catcode.com/teachmod/ chmod] utility including examples, mini quizzes, and more&lt;br /&gt;
*The venerable Sultans of Tech, O&amp;#039;Reilly, have also written up a [http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html tutorial] for us&lt;/div&gt;</summary>
		<author><name>Ccn admin</name></author>
	</entry>
</feed>