[deployment-guide: 111/185] Corrected the "Group Directories" subsection. (BZ#681883)

Jaromir Hradilek jhradile at fedoraproject.org
Sun May 15 21:20:28 UTC 2011


commit b976ee942318efce2c841c72b59752a538a15e62
Author: Jaromir Hradilek <jhradile at redhat.com>
Date:   Mon Mar 7 14:22:27 2011 +0100

    Corrected the "Group Directories" subsection. (BZ#681883)

 en-US/Book_Info.xml                 |    2 +-
 en-US/Managing_Users_and_Groups.xml |   60 ++++++++++++++++++----------------
 2 files changed, 33 insertions(+), 29 deletions(-)
---
diff --git a/en-US/Book_Info.xml b/en-US/Book_Info.xml
index 47ce8a6..7c93c4c 100644
--- a/en-US/Book_Info.xml
+++ b/en-US/Book_Info.xml
@@ -7,7 +7,7 @@
   <productname>Red Hat Enterprise Linux</productname>
   <productnumber>6</productnumber>
   <edition>1</edition>
-  <pubsnumber>101</pubsnumber>
+  <pubsnumber>102</pubsnumber>
   <abstract>
     <para>
       The <citetitle pubwork="book">Deployment Guide</citetitle> documents relevant information regarding the deployment, configuration and administration of &MAJOROSVER;. It is oriented towards system administrators with a basic understanding of the system.
diff --git a/en-US/Managing_Users_and_Groups.xml b/en-US/Managing_Users_and_Groups.xml
index 8346baa..7f6ae00 100644
--- a/en-US/Managing_Users_and_Groups.xml
+++ b/en-US/Managing_Users_and_Groups.xml
@@ -4150,10 +4150,7 @@ drwxr-xr-x. 4 juan juan 4096 Nov 23 15:09 .mozilla</screen>
       <tertiary><application>system-config-users</application></tertiary>
     </indexterm>
     <para>
-      &MAJOROS; uses a <firstterm>user private group</firstterm> (<firstterm>UPG</firstterm>) scheme, which makes UNIX groups easier to manage.
-    </para>
-    <para>
-      A UPG is created whenever a new user is added to the system. A UPG has the same name as the user for which it was created and that user is the only member of the UPG.
+      &MAJOROS; uses a <firstterm>user private group</firstterm> (<firstterm>UPG</firstterm>) scheme, which makes UNIX groups easier to manage. A UPG is created whenever a new user is added to the system. It has the same name as the user for which it was created and that user is the only member of the UPG.
     </para>
     <para>
       UPGs make it safe to set default permissions for a newly created file or directory, allowing both the user and <emphasis>the group of that user</emphasis> to make modifications to the file or directory.
@@ -4175,33 +4172,40 @@ drwxr-xr-x. 4 juan juan 4096 Nov 23 15:09 .mozilla</screen>
         System administrators usually like to create a group for each major project and assign people to the group when they need to access that project's files. With this traditional scheme, file managing is difficult; when someone creates a file, it is associated with the primary group to which they belong. When a single person works on multiple projects, it becomes difficult to associate the right files with the right group. However, with the UPG scheme, groups are automatically assigned to files created within a directory with the <firstterm>setgid</firstterm> bit set. The setgid bit makes managing group projects that share a common directory very simple because any files a user creates within the directory are owned by the group which owns the directory.
       </para>
       <para>
-        For example, a group of people need to work on files in the <filename>/usr/share/emacs/site-lisp/</filename> directory. Some people are trusted to modify the directory, but not everyone. First create an <computeroutput>emacs</computeroutput> group, as in the following command:
-      </para>
-      <screen><command>/usr/sbin/groupadd emacs</command></screen>
-      <para>
-        To associate the contents of the directory with the <computeroutput>emacs</computeroutput> group, type:
-      </para>
-      <screen><command>chown -R root.emacs <filename>/usr/share/emacs/site-lisp</filename></command></screen>
-      <para>
-        Now, it is possible to add the right users to the group with the <command>gpasswd</command> command:
-      </para>
-      <screen><command>/usr/bin/gpasswd -a <replaceable>&lt;username&gt;</replaceable> emacs</command></screen>
-      <para>
-        To allow users to create files within the directory, use the following command:
-      </para>
-      <screen><command>chmod 775 <filename>/usr/share/emacs/site-lisp</filename></command></screen>
-      <para>
-        When a user creates a new file, it is assigned the group of the user's default private group. Next, set the setgid bit, which assigns everything created in the directory the same group permission as the directory itself (<computeroutput>emacs</computeroutput>). Use the following command:
-      </para>
-      <screen><command>chmod 2775 /usr/share/emacs/site-lisp</command></screen>
-      <para>
-        At this point, because the default umask of each user is 002, all members of the <computeroutput>emacs</computeroutput> group can create and edit files in the <filename>/usr/share/emacs/site-lisp/</filename> directory without the administrator having to change file permissions every time users write new files.
+        For example, a group of people need to work on files in the <filename class="directory">/opt/myproject/</filename> directory. Some people are trusted to modify the contents of this directory, but not everyone.
       </para>
+      <procedure>
+        <step>
+          <para>
+            As <systemitem class="username">root</systemitem>, create the <filename class="directory">/opt/myproject/</filename> directory by typing the following at a shell prompt:
+          </para>
+          <screen><command>mkdir /opt/myproject</command></screen>
+        </step>
+        <step>
+          <para>
+            Add the <systemitem class="groupname">myproject</systemitem> group to the system:
+          </para>
+          <screen><command>groupadd myproject</command></screen>
+        </step>
+        <step>
+          <para>
+            Associate the contents of the <filename class="directory">/opt/myproject/</filename> directory with the <systemitem class="groupname">myproject</systemitem> group:
+          </para>
+          <screen><command>chown root:myproject /opt/myproject</command></screen>
+        </step>
+        <step>
+          <para>
+            Allow users to create files within the directory, and set the setgid bit:
+          </para>
+          <screen><command>chmod 2775 /opt/myproject</command></screen>
+        </step>
+      </procedure>
       <para>
-        The command <command>ls -l /usr/share/emacs/</command> displays the current settings:
+        At this point, all members of the <systemitem class="groupname">myproject</systemitem> group can create and edit files in the <filename class="directory">/opt/myproject/</filename> directory without the administrator having to change file permissions every time users write new files. To verify that the permissions have been set correctly, run the following command:
       </para>
-      <screen>total 4
-drwxrwsr-x. 2 root emacs 4096 May 18 15:41 site-lisp</screen>
+      <screen>~]# <command>ls -l /opt</command>
+total 4
+drwxrwsr-x. 3 root myproject 4096 Mar  3 18:31 myproject</screen>
     </section>
   </section>
   <section id="s1-users-groups-shadow-utilities">


More information about the docs-commits mailing list