From b822811980a5f82726cb641cbeff66be9eb6d92a Mon Sep 17 00:00:00 2001 From: Mark Hymers Date: Sun, 22 Jul 2001 19:45:10 +0000 Subject: XML changes git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@827 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter03/creatingdirs.xml | 54 ++++++++++++++++------------------------------ 1 file changed, 19 insertions(+), 35 deletions(-) (limited to 'chapter03/creatingdirs.xml') diff --git a/chapter03/creatingdirs.xml b/chapter03/creatingdirs.xml index d581f3ffd..a37be20bd 100644 --- a/chapter03/creatingdirs.xml +++ b/chapter03/creatingdirs.xml @@ -1,16 +1,12 @@ Creating directories - -Let's create the directory tree on the LFS partition based on the FHS +Let's create the directory tree on the LFS partition based on the FHS standard, which can be found at http://www.pathname.com/fhs/. -Issuing the following commands will create a default directory layout: - +Issuing the following commands will create a default directory layout: - - -cd $LFS +cd $LFS mkdir -p bin boot dev/pts etc/opt home lib mnt proc root sbin tmp var opt for dirname in $LFS/usr $LFS/usr/local    do @@ -30,50 +26,38 @@ Issuing the following commands will create a default directory layout: cd $LFS/opt mkdir bin doc include info lib man cd $LFS/usr -ln -s ../var/tmp tmp - +ln -s ../var/tmp tmp - -Normally, directories are created with permission mode 755, which isn't +Normally, directories are created with permission mode 755, which isn't desired for all directories. The first change is a mode 0750 for the $LFS/root directory. This is to make sure that not just everybody can enter the /root directory (the same a user would do with /home/username directories). The second change is a mode 1777 for the tmp directories. This way, any user can write data to the /tmp or /var/tmp directory but cannot remove another user's files (the latter is caused -by the so-called "sticky bit" - bit 1 of the 1777 bit mask). - +by the so-called "sticky bit" - bit 1 of the 1777 bit mask). - - -cd $LFS && +cd $LFS && chmod 0750 root && -chmod 1777 tmp var/tmp - - +chmod 1777 tmp var/tmp - -Now that the directories are created, copy the source files that were +Now that the directories are created, copy the source files that were downloaded in chapter 3 to some subdirectory under $LFS/usr/src (you -will need to create the desired directory yourself). - +will need to create the desired directory yourself). FHS compliance notes - -The FHS stipulates that the /usr/local directory should contain the bin, games, -include, lib, man, sbin, and share subdirectories. You can alter your /usr/local -directory yourself if you want your system to be FHS-compliant. - +The FHS stipulates that the /usr/local directory should contain the +bin, games,include, lib, man, sbin, and share subdirectories. You can +alter your /usr/local directory yourself if you want your system +to be FHS-compliant. - -Also, the standard says that there should exist a /usr/share/games directory, -which we don't much like for a base system. But feel free to make your system -FHS-compliant if you wish. The FHS isn't precise as to the structure of the -/usr/local/share subdirectories, so we took the liberty of creating the -directories that we felt needed. - +Also, the standard says that there should exist a /usr/share/games +directory, which we don't much like for a base system. But feel free to +make your system FHS-compliant if you wish. The FHS isn't precise as +to the structure of the /usr/local/share subdirectories, so we took the +liberty of creating the directories that we felt needed. -- cgit v1.2.3-54-g00ecf