From owner-p4-projects@FreeBSD.ORG Sun Sep 28 15:31:31 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 40BDF106568C; Sun, 28 Sep 2008 15:31:31 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03F081065689 for ; Sun, 28 Sep 2008 15:31:31 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E4CF58FC0A for ; Sun, 28 Sep 2008 15:31:30 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id m8SFVUXn089497 for ; Sun, 28 Sep 2008 15:31:30 GMT (envelope-from rene@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m8SFVUIA089485 for perforce@freebsd.org; Sun, 28 Sep 2008 15:31:30 GMT (envelope-from rene@FreeBSD.org) Date: Sun, 28 Sep 2008 15:31:30 GMT Message-Id: <200809281531.m8SFVUIA089485@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rene@FreeBSD.org using -f From: Rene Ladan To: Perforce Change Reviews Cc: Subject: PERFORCE change 150602 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2008 15:31:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=150602 Change 150602 by rene@rene_self on 2008/09/28 15:31:12 IFC Affected files ... .. //depot/projects/docproj_nl/en_US.ISO8859-1/articles/gjournal-desktop/article.sgml#2 integrate .. //depot/projects/docproj_nl/en_US.ISO8859-1/books/handbook/Makefile#2 integrate .. //depot/projects/docproj_nl/en_US.ISO8859-1/books/handbook/basics/chapter.sgml#2 integrate .. //depot/projects/docproj_nl/en_US.ISO8859-1/books/handbook/book.sgml#2 integrate .. //depot/projects/docproj_nl/en_US.ISO8859-1/books/handbook/chapters.ent#2 integrate .. //depot/projects/docproj_nl/en_US.ISO8859-1/books/handbook/dtrace/Makefile#1 branch .. //depot/projects/docproj_nl/en_US.ISO8859-1/books/handbook/dtrace/chapter.sgml#1 branch .. //depot/projects/docproj_nl/en_US.ISO8859-1/books/handbook/eresources/chapter.sgml#6 integrate .. //depot/projects/docproj_nl/en_US.ISO8859-1/books/handbook/filesystems/Makefile#1 branch .. //depot/projects/docproj_nl/en_US.ISO8859-1/books/handbook/filesystems/chapter.sgml#1 branch .. //depot/projects/docproj_nl/en_US.ISO8859-1/books/handbook/geom/chapter.sgml#3 integrate .. //depot/projects/docproj_nl/en_US.ISO8859-1/books/handbook/mirrors/chapter.sgml#6 integrate .. //depot/projects/docproj_nl/en_US.ISO8859-1/books/handbook/ports/chapter.sgml#3 integrate .. //depot/projects/docproj_nl/en_US.ISO8859-1/books/handbook/security/chapter.sgml#8 integrate .. //depot/projects/docproj_nl/en_US.ISO8859-1/books/handbook/updating/Makefile#1 branch .. //depot/projects/docproj_nl/en_US.ISO8859-1/books/handbook/updating/chapter.sgml#1 branch .. //depot/projects/docproj_nl/en_US.ISO8859-1/share/sgml/mailing-lists.ent#5 integrate .. //depot/projects/docproj_nl/share/sgml/man-refs.ent#5 integrate Differences ... ==== //depot/projects/docproj_nl/en_US.ISO8859-1/articles/gjournal-desktop/article.sgml#2 (text+ko) ==== @@ -13,22 +13,22 @@
- Implementing UFS journaling on a desktop PC + Implementing UFS Journaling on a Desktop PC Manolis Kiagias -
sonicy@otenet.gr
+
manolis@FreeBSD.org
2008 - Manolis Kiagias + Manolis Kiagias - $FreeBSD: doc/en_US.ISO8859-1/articles/gjournal-desktop/article.sgml,v 1.2 2008/04/28 15:56:20 gabor Exp $ + $FreeBSD: doc/en_US.ISO8859-1/articles/gjournal-desktop/article.sgml,v 1.3 2008/09/26 11:44:17 pgj Exp $ &tm-attrib.freebsd; @@ -36,16 +36,16 @@ - A journaling filesystem uses a log to record all transactions - that take place in the filesystem, and preserves its integrity in the + A journaling file system uses a log to record all transactions + that take place in the file system, and preserves its integrity in the event of a system crash or power failure. Although it is still possible to lose unsaved changes to files, journaling almost - completely eliminates the possibility of filesystem corruption caused + completely eliminates the possibility of file system corruption caused by an unclean shutdown. It also shortens to a minimum the time - required for after-failure filesystem checking. Although the UFS - filesystem employed by &os; does not implement journaling itself, - the new journal class of the GEOM framework in &os; 7.X can be - used to provide filesystem independent journaling. This article + required for after-failure file system checking. Although the UFS + file system employed by &os; does not implement journaling itself, + the new journal class of the GEOM framework in &os; 7.X can be + used to provide file system independent journaling. This article explains how to implement UFS journaling on a typical desktop PC scenario. @@ -57,15 +57,15 @@ While professional servers are usually well protected from unforeseen shutdowns, the typical desktop is at the mercy of power failures, accidental resets, and other user related incidents that can - lead to unclean shutdowns. Soft updates usually protect the filesystem + lead to unclean shutdowns. Soft Updates usually protect the file system efficiently in such cases, although most of the times a lengthy - background check is required. On rare occasions, filesystem corruption + background check is required. On rare occasions, file system corruption reaches a point where user intervention is required and data may be lost. The new journaling capability provided by GEOM can greatly assist in such scenarios, by virtually eliminating the time required for - filesystem checking, and ensuring that the filesystem is quickly + file system checking, and ensuring that the file system is quickly restored to a consistent state. This article describes a procedure for implementing UFS journaling @@ -88,7 +88,7 @@ - How to convert your existing filesystems to utilize journaling, + How to convert your existing file systems to utilize journaling, and what options to use in /etc/fstab to mount them. @@ -128,59 +128,59 @@ - Understanding journaling in &os; + Understanding Journaling in &os; - The journaling provided by GEOM in &os; 7.X is not filesystem - specific (unlike for example the ext3 filesystem in &linux;) but is + The journaling provided by GEOM in &os; 7.X is not file system + specific (unlike for example the ext3 file system in &linux;) but is functioning at the block level. Though this means it can be applied - to different filesystems, for &os; 7.0-RELEASE, it can only be used + to different file systems, for &os; 7.0-RELEASE, it can only be used on UFS2. This functionality is provided by loading the geom_journal.ko module into the kernel (or building it into a custom kernel) and using the - gjournal command to configure the filesystems. - In general, you would like to journal large filesystems, like + gjournal command to configure the file systems. + In general, you would like to journal large file systems, like /usr. You will need however (see the following section) to reserve some free disk space. - When a filesystem is journaled, some disk space is needed to keep + When a file system is journaled, some disk space is needed to keep the journal itself. The disk space that holds the actual data is referred to as the data provider, while the one that holds the journal is referred to as the journal provider. The data and journal providers need to be on different partitions when journaling an existing - (non empty) partition. When journaling a new partition, you have the + (non-empty) partition. When journaling a new partition, you have the option to use a single provider for both data and journal. In any case, the gjournal command combines both providers to - create the final journaled filesystem. For example: + create the final journaled file system. For example: - You wish to journal your /usr filesystem, - stored in /dev/ad0s1f (which + You wish to journal your /usr file system, + stored in /dev/ad0s1f (which already contains data). You reserved some free disk space in a partition in - /dev/ad0s1g. + /dev/ad0s1g. Using gjournal, a new /dev/ad0s1f.journal device is created - where /dev/ad0s1f is the data - provider, and /dev/ad0s1g is + class="devicefile">/dev/ad0s1f.journal device is created + where /dev/ad0s1f is the data + provider, and /dev/ad0s1g is the journal provider. This new device is then used for all subsequent file operations. The amount of disk space you need to reserve for the journal - provider depends on the usage load of the filesystem and not on the + provider depends on the usage load of the file system and not on the size of the data provider. For example on a typical office desktop, - a 1Gb journal provider for the /usr filesystem + a 1 GB journal provider for the /usr file system will suffice, while a machine that deals with heavy disk I/O (i.e. video editing) may need more. A kernel panic will occur if the journal space is exhausted before it has a chance to be @@ -191,10 +191,10 @@ - Steps during the installation of &os; + Steps During the Installation of &os; - Reserving space for journaling + Reserving Space for Journaling A typical desktop machine usually has one hard disk that stores both the OS and user data. Arguably, the default partitioning scheme @@ -202,17 +202,17 @@ suitable: A desktop machine does not need a large /var partition, while /usr is allocated the bulk of the disk space, since user data and a lot of - packages are installed into its sub-directories. + packages are installed into its subdirectories. The default partitioning (the one obtained by pressing - A at the disklabel editor) does not leave any + A at the &os; partition editor, called Disklabel) does not leave any unallocated space. Each partition that will be journaled, requires another partition for the journal. Since the /usr partition is the largest, it makes sense to shrink this partition slightly, to obtain the space required for journaling. - In our example, an 80Gb disk is used. The following screenshot - shows the default partitions created by the disklabel editor during + In our example, an 80 GB disk is used. The following screenshot + shows the default partitions created by Disklabel during installation: @@ -222,25 +222,25 @@ If this is more or less what you need, it is very easy to adjust - for journaling. Simply use the up and - down arrow keys to move the highlight to the + for journaling. Simply use the + arrow keys to move the highlight to the /usr partition and press D to delete it. Now, move the highlight to the disk name at the top of the screen and press C to create a new partition for /usr. This new partition should be smaller by - 1Gb (if you intend to journal /usr only), or - 2Gb (if you intend to journal both /usr and + 1 GB (if you intend to journal /usr only), or + 2 GB (if you intend to journal both /usr and /var). From the pop-up that appears, opt to - create a filesystem, and type /usr as the mount + create a file system, and type /usr as the mount point. Should you journal the /var partition? Normally, journaling makes sense on quite large partitions. You may decide not to journal /var, although doing so - on a typical desktop will cause no harm. If the filesystem is + on a typical desktop will cause no harm. If the file system is lightly used (quite probable for a desktop) you may wish to allocate less disk space for its journal. @@ -266,9 +266,9 @@ /etc/fstab will have to be edited, and the extra swap space entries removed. - To create the swap, again use the up and - down arrow keys to move the highlight to the top of - the disklabel editor screen, so that the disk name itself is + To create the swap, again use the + arrow keys to move the highlight to the top of + Disklabel screen, so that the disk name itself is highlighted. Then press N, enter the desired size (1024M), and select swap space from the pop-up menu that appears. Repeat @@ -290,12 +290,12 @@ following table shows our notes for the sample configuration: - Partitions and journals + Partitions and Journals Partition - Mount point + Mount Point Journal @@ -316,7 +316,7 @@
Continue the installation as you would normally do. We would - however suggest you postpone installation of add-on software + however suggest you postpone installation of third party software (packages) until you have completely setup journaling. @@ -335,42 +335,42 @@ - Setting up journaling + Setting Up Journaling - Executing gjournal + Executing <command>gjournal</command> Having prepared all the required partitions, it is quite easy to configure journaling. We will need to switch to single user - mode, so login as root and type: + mode, so login as root and type:
- &prompt.root; shutdown now + &prompt.root; shutdown now - Press enter to get the default shell. We will need to unmount + Press Enter to get the default shell. We will need to unmount the partitions that will be journaled, in our example - /usr and /var: + /usr and /var: - &prompt.root; umount /usr /var + &prompt.root; umount /usr /var Load the module required for journaling: - &prompt.root; gjournal load + &prompt.root; gjournal load Now, use your notes to determine which partition will be used for each journal. In our example, /usr is - ad0s1f and its journal will be - ad0s1g, while + ad0s1f and its journal will be + ad0s1g, while /var is ad0s1d and will - be journaled to ad0s1h. + class="devicefile">ad0s1d and will + be journaled to ad0s1h. The following commands are required: - &prompt.root; gjournal label ad0s1f ad0s1g + &prompt.root; gjournal label ad0s1f ad0s1g GEOM_JOURNAL: Journal 2948326772: ad0s1f contains data. GEOM_JOURNAL: Journal 2948326772: ad0s1g contains journal. -&prompt.root; gjournal label ad0s1d ad0s1h +&prompt.root; gjournal label ad0s1d ad0s1h GEOM_JOURNAL: Journal 3193218002: ad0s1d contains data. GEOM_JOURNAL: Journal 3193218002: ad0s1h contains journal. @@ -381,34 +381,34 @@ to run the command using the flag to force an overwrite, i.e.: - &prompt.root; gjournal label -f ad0s1d ad0s1h + &prompt.root; gjournal label -f ad0s1d ad0s1h Since this is a new installation, it is highly unlikely that anything will be actually overwritten. At this point, two new devices are created, namely - ad0s1d.journal and - ad0s1f.journal. These represent + ad0s1d.journal and + ad0s1f.journal. These represent the /var and /usr partitions we have to mount. Before mounting, we must however set - the journal flag on them and clear the soft updates flag: + the journal flag on them and clear the Soft Updates flag: - &prompt.root; tunefs -J enable -n disable ad0s1d.journal + &prompt.root; tunefs -J enable -n disable ad0s1d.journal tunefs: gjournal set tunefs: soft updates cleared -&prompt.root; tunefs -J enable -n disable ad0s1f.journal +&prompt.root; tunefs -J enable -n disable ad0s1f.journal tunefs: gjournal set tunefs: soft updates cleared Now, mount the new devices manually at their respective places - (note that we can now use the async mount + (note that we can now use the mount option): - &prompt.root; mount -o async /dev/ad0s1d.journal /var -&prompt.root; mount -o async /dev/ad0s1f.journal /usr + &prompt.root; mount -o async /dev/ad0s1d.journal /var +&prompt.root; mount -o async /dev/ad0s1f.journal /usr Edit /etc/fstab and update the entries for /usr and /var: @@ -428,7 +428,7 @@ geom_journal_load="YES" Congratulations! Your system is now set for journaling. You can - either type exit to return to multi-user mode, or + either type exit to return to multi-user mode, or reboot to test your configuration (recommended). During the boot you will see messages like the following: @@ -446,42 +446,42 @@ GEOM_JOURNAL: Journal ad0s1d consistent. This usually means that &man.gjournal.8; used the information in - the journal provider to return the filesystem to a consistent + the journal provider to return the file system to a consistent state. - Journaling newly created partitions + Journaling Newly Created Partitions While the above procedure is necessary for journaling partitions that already contain data, journaling an empty partition is somewhat easier, since both the data and the journal provider can be stored in the same partition. For example, assume a new disk was installed, - and a new partition /dev/ads1s1d + and a new partition /dev/ad1s1d was created. Creating the journal would be as simple as: - &prompt.root; gjournal label ad1s1d + &prompt.root; gjournal label ad1s1d - The journal size will be 1GB by default. You may adjust it by + The journal size will be 1 GB by default. You may adjust it by using the option. The value can be given in bytes, or appended by K, M or G to denote Kilobytes, Megabytes or Gigabytes respectively. Note that gjournal will not allow you to create unsuitably small journal sizes. - For example, to create a 2GB journal, you could use the following + For example, to create a 2 GB journal, you could use the following command: - &prompt.root; gjournal label -s 2G ad1s1d + &prompt.root; gjournal label -s 2G ad1s1d - You can then create a filesystem on your new partition, and + You can then create a file system on your new partition, and enable journaling using the option: - &prompt.root; newfs -J /dev/ad1s1d.journal + &prompt.root; newfs -J /dev/ad1s1d.journal - Building journaling into your custom kernel + Building Journaling into Your Custom Kernel If you do not wish to load geom_journal as a module, you can build its functions right into your kernel. Edit your @@ -503,7 +503,7 @@ - Troubleshooting journaling + Troubleshooting Journaling The following section covers frequently asked questions regarding problems related to journaling. @@ -534,17 +534,17 @@ You either forgot (or misspelled) the entry in /boot/loader.conf, or there are errors in your /etc/fstab file. These are usually easy - to fix. Press enter to get to the default single user shell. Then + to fix. Press Enter to get to the default single user shell. Then locate the root of the problem: - &prompt.root; cat /boot/loader.conf + &prompt.root; cat /boot/loader.conf If the geom_journal_load entry is missing or misspelled, the journaled devices are never created. Load the module manually, mount all partitions, and continue with multi-user boot: - &prompt.root; gjournal load + &prompt.root; gjournal load GEOM_JOURNAL: Journal 2948326772: ad0s1g contains journal. GEOM_JOURNAL: Journal 3193218002: ad0s1h contains journal. @@ -553,9 +553,9 @@ GEOM_JOURNAL: Journal 2948326772: ad0s1f contains data. GEOM_JOURNAL: Journal ad0s1f clean. -&prompt.root; mount -a -&prompt.root; exit -(boot continues) +&prompt.root; mount -a +&prompt.root; exit +(boot continues) If, on the other hand, this entry is correct, have a look at /etc/fstab. You will probably find a @@ -566,8 +566,8 @@ - Can I remove journaling and return to my standard filesystem - with soft updates? + Can I remove journaling and return to my standard file system + with Soft Updates? @@ -575,47 +575,47 @@ changes. The partitions you created for the journal providers can then be used for other purposes, if you so wish. - Login as root and switch to single user mode: + Login as root and switch to single user mode: - &prompt.root; shutdown now + &prompt.root; shutdown now Synchronize the journals: - &prompt.root; gjournal sync + &prompt.root; gjournal sync Unmount the journaled partitions: - &prompt.root; umount /usr /var + &prompt.root; umount /usr /var Stop the journaling providers: - &prompt.root; gjournal stop ad0s1d.journal -&prompt.root; gjournal stop ad0s1f.journal + &prompt.root; gjournal stop ad0s1d.journal +&prompt.root; gjournal stop ad0s1f.journal Clear journaling metadata from all the devices used: - &prompt.root; gjournal clear ad0s1d -&prompt.root; gjournal clear ad0s1f -&prompt.root; gjournal clear ad0s1g -&prompt.root; gjournal clear ad0s1h + &prompt.root; gjournal clear ad0s1d +&prompt.root; gjournal clear ad0s1f +&prompt.root; gjournal clear ad0s1g +&prompt.root; gjournal clear ad0s1h - Clear the filesystem journaling flag, and restore the soft - updates flag: + Clear the file system journaling flag, and restore the Soft + Updates flag: - &prompt.root; tunefs -J disable -n enable ad0s1d + &prompt.root; tunefs -J disable -n enable ad0s1d tunefs: gjournal cleared tunefs: soft updates set -&prompt.root; tunefs-J disable -n enable ad0s1f +&prompt.root; tunefs -J disable -n enable ad0s1f tunefs: gjournal cleared tunefs: soft updates set Remount the old devices by hand: - &prompt.root; mount -o rw /dev/ad0s1d /var -&prompt.root; mount -o rw /dev/ad0s1f /usr + &prompt.root; mount -o rw /dev/ad0s1d /var +&prompt.root; mount -o rw /dev/ad0s1f /usr Edit /etc/fstab and restore it to its original state: @@ -633,7 +633,7 @@ - Further reading + Further Reading Journaling is a fairly new feature of &os;, and as such, it is not very well documented yet. You may however find the following @@ -652,7 +652,7 @@ This post - in &a.questions.name; by Ivan Voras. + in &a.questions.name; by &a.ivoras;. ==== //depot/projects/docproj_nl/en_US.ISO8859-1/books/handbook/Makefile#2 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: doc/en_US.ISO8859-1/books/handbook/Makefile,v 1.109 2008/03/03 11:07:37 brd Exp $ +# $FreeBSD: doc/en_US.ISO8859-1/books/handbook/Makefile,v 1.110 2008/09/28 12:54:12 trhodes Exp $ # # Build the FreeBSD Handbook. # @@ -198,6 +198,7 @@ SRCS+= audit/chapter.sgml SRCS+= book.sgml SRCS+= colophon.sgml +SRCS+= dtrace/chapter.sgml SRCS+= freebsd-glossary.sgml SRCS+= advanced-networking/chapter.sgml SRCS+= basics/chapter.sgml @@ -209,6 +210,7 @@ SRCS+= disks/chapter.sgml SRCS+= eresources/chapter.sgml SRCS+= firewalls/chapter.sgml +SRCS+= filesystems/chapter.sgml SRCS+= geom/chapter.sgml SRCS+= install/chapter.sgml SRCS+= introduction/chapter.sgml @@ -228,6 +230,7 @@ SRCS+= printing/chapter.sgml SRCS+= security/chapter.sgml SRCS+= serialcomms/chapter.sgml +SRCS+= updating/chapter.sgml SRCS+= users/chapter.sgml SRCS+= vinum/chapter.sgml SRCS+= virtualization/chapter.sgml ==== //depot/projects/docproj_nl/en_US.ISO8859-1/books/handbook/basics/chapter.sgml#2 (text+ko) ==== @@ -1,7 +1,7 @@ @@ -653,6 +653,145 @@ over the &man.chflags.1; and &man.chflags.2; manual pages for more information. + + + + + + Tom + Rhodes + Contributed by + + + + + The setuid, setgid, and sticky Permissions + + Other than the permissions already discussed, there are + three other specific settings that all administrators should + know about. They are the setuid, + setgid and sticky + permissions. + + These settings are important for some &unix; operations + as they provide functionality not normally granted to normal + users. To understand them, the difference between the real + user ID and effective user ID must also be noted. + + The real user ID is the UID who owns + or starts the process. The effective UID + is the user ID the process runs as. As an example, the + &man.passwd.1; utility runs with the real user ID as the + user changing their password; however, to manipulate the + password database, it runs as the effective ID of the + root user. This is what allows normal + users to change their passwords without seeing a + Permission Denied error. + + + The nosuid &man.mount.8; option will + cause these binaries to silently fail. That is, they will + fail to execute without ever alerting the user. That option + is also not completely reliable as a nosuid + wrapper may be able to circumvent it; according to the + &man.mount.8; manual page. + + + The setuid permission may be set by prefixing a permission + set with the number four (4) as shown in the following + example: + + &prompt.root; chmod 4755 suidexample.sh + + The permissions on the + suidexample.sh + file should now look like the following: + + -rwsr-xr-x 1 trhodes trhodes 63 Aug 29 06:36 suidexample.sh + + It should be noticeable from this example that an + s is now part of the permission set + designated for the file owner, replacing the executable + bit. This allows utilities which need elevated permissions, + such as passwd. + + To view this in real time, open two terminals. On + one, start the passwd process as a normal + user. While it waits for a new password, check the process + table and look at the user information of the + passwd command. + + In terminal A: + + Changing local password for trhodes +Old Password: + + In terminal B: + + &prompt.root; ps aux | grep passwd + + trhodes 5232 0.0 0.2 3420 1608 0 R+ 2:10AM 0:00.00 grep passwd +root 5211 0.0 0.2 3620 1724 2 I+ 2:09AM 0:00.01 passwd + + As stated above, the passwd is run + by a normal user, but is using the effective + UID of root. + + The setgid permission performs the + same function as the setuid permission; + except that it alters the group settings. When an application + or utility is ran with this setting, it will be granted the + permissions based on the group that owns the file, not + the user who started the process. + + To set the setgid permission on a + file, provide the chmod command with a + leading two (2) as in the following example: + + &prompt.root; chmod 2755 suidexample.sh + + The new setting may be viewed as before, notice the + s is now in the field designated for the + group permission settings: + + -rwxr-sr-x 1 trhodes trhodes 44 Aug 31 01:49 suidexample.sh + + + In these examples, even though the shell script in + question is an executable file, it will not run with + a different EUID or effective user ID. + This is because shell scripts may not access the + &man.setuid.2; system calls. + + + The first two special permission bits we discussed + (the setuid and setgid + permission bits) may lower system security, by allowing for + elevated permissions. There is a third special permission bit + that can strengthen the security of a system: the + sticky bit. + + The sticky bit, when set on a directory, + allows file deletion only by the file owner. This + permission set is useful to prevent file deletion in public + directories, such as + /tmp, by users who do + not own the file. To utilize this permission, prefix the + permission with a one (1). For example: + + &prompt.root; chmod 1777 /tmp + + Now, it is possible to see the effect by using the + ls command: + + &prompt.root; ls -al / | grep tmp + + drwxrwxrwt 10 root wheel 512 Aug 31 01:49 tmp + + The sticky bit permission is + distinguishable from the t at the very + end of the set. + ==== //depot/projects/docproj_nl/en_US.ISO8859-1/books/handbook/book.sgml#2 (text+ko) ==== @@ -1,7 +1,7 @@ + + + %pgpkeys; ]> @@ -270,10 +273,12 @@ + + @@ -316,6 +321,7 @@ can begin using FreeBSD in a network environment. + ==== //depot/projects/docproj_nl/en_US.ISO8859-1/books/handbook/chapters.ent#2 (text+ko) ==== @@ -6,7 +6,7 @@ Chapters should be listed in the order in which they are referenced. - $FreeBSD: doc/en_US.ISO8859-1/books/handbook/chapters.ent,v 1.37 2007/04/06 07:38:50 murray Exp $ + $FreeBSD: doc/en_US.ISO8859-1/books/handbook/chapters.ent,v 1.38 2008/09/28 12:54:12 trhodes Exp $ --> @@ -35,12 +35,15 @@ + + + ==== //depot/projects/docproj_nl/en_US.ISO8859-1/books/handbook/eresources/chapter.sgml#6 (text+ko) ==== @@ -1,7 +1,7 @@ @@ -594,10 +594,11 @@ you can change your digest options in your account options section. - CVS lists: The following lists are for people - interested in seeing the log messages for changes to various areas of - the source tree. They are Read-Only lists and - should not have mail sent to them. + CVS & SVN lists: The following lists + are for people interested in seeing the log messages for changes to + various areas of the source tree. They are + Read-Only lists and should not have mail sent to + them. @@ -637,7 +638,15 @@ &a.cvs-src.name; /usr/src - All changes to the src tree + All changes to the src tree (generated by the svn-to-cvs + importer commits) + + + + &a.svn-src.name; + /usr/src + All changes to the src tree + (SVN commit logs) ==== //depot/projects/docproj_nl/en_US.ISO8859-1/books/handbook/geom/chapter.sgml#3 (text+ko) ==== @@ -1,6 +1,6 @@ @@ -240,135 +240,126 @@ safe. To begin, ensure the system has two disk drives of equal size, - this exercise assumes they are direct access (&man.da.4;) + these exercises assume they are direct access (&man.da.4;) SCSI disks. - Begin by installing &os; on the first disk with only two - partitions. One should be a swap partition, double the - RAM size and all remaining space devoted to - the root (/) file system. - It is possible to have separate partitions for other mount points; - however, this will increase the difficulty level ten fold due to - manual alteration of the &man.bsdlabel.8; and &man.fdisk.8; - settings. + + Mirroring Primary Disks - Reboot and wait for the system to fully initialize. Once this - process has completed, log in as the root - user. + Assuming &os; has been installed on the first, + da0 disk device, &man.gmirror.8; + should be told to store its primary data there. - Create the /dev/mirror/gm device and link - it with /dev/da1: + Before building the mirror, enable additional debugging + information and opening access to the device by setting the + kern.geom.debugflags &man.sysctl.8; option + to the following value: - &prompt.root; gmirror label -vnb round-robin gm0 /dev/da1 + &prompt.root; sysctl kern.geom.debugflags=17 - The system should respond with: - -Metadata value stored on /dev/da1. -Done. + Now create the mirror. Begin the process by storing + meta-data information on the primary disk device, + effectively creating the + /dev/mirror/gm device + using the following command: - Initialize GEOM, this will load the - /boot/kernel/geom_mirror.ko kernel - module: + &prompt.root; gmirror label -vb round-robin gm0 /dev/da0 - &prompt.root; gmirror load + The system should respond with: - - This command should have created the - gm0, device node under the - /dev/mirror - directory. - + Metadata value stored on /dev/da0. +Done. - Install a generic fdisk label and boot code - to new gm0 device: + Initialize GEOM, this will load the + /boot/kernel/geom_mirror.ko kernel + module: - &prompt.root; fdisk -vBI /dev/mirror/gm0 + &prompt.root; gmirror load - Now install generic bsdlabel - information: + + When this command completes successfully, it creates the + gm0 device node under the + /dev/mirror + directory. + - &prompt.root; bsdlabel -wB /dev/mirror/gm0s1 + Enable loading of the geom_mirror.ko + kernel module during system initialization: - - If multiple slices and partitions exist, the flags for the - previous two commands will require alteration. They must match - the slice and partition size of the other disk. - + &prompt.root; echo 'geom_mirror_load="YES"' >> /boot/loader.conf - Use the &man.newfs.8; utility to construct a default UFS >>> TRUNCATED FOR MAIL (1000 lines) <<<