Changeset b822811 for chapter03/creatingdirs.xml
- Timestamp:
- 07/22/2001 07:45:10 PM (23 years ago)
- Branches:
- 10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 6.0, 6.1, 6.1.1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, v3_0, v3_1, v3_2, v3_3, v4_0, v4_1, v5_0, v5_1, v5_1_1, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- f1da843
- Parents:
- 46f5461
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter03/creatingdirs.xml
r46f5461 rb822811 2 2 <title>Creating directories</title> 3 3 4 <para> 5 Let's create the directory tree on the LFS partition based on the FHS 4 <para>Let's create the directory tree on the LFS partition based on the FHS 6 5 standard, which can be found at <ulink 7 6 url="http://www.pathname.com/fhs/">http://www.pathname.com/fhs/</ulink>. 8 Issuing the following commands will create a default directory layout: 9 </para> 7 Issuing the following commands will create a default directory layout:</para> 10 8 11 <para> 12 <screen> 13 <userinput>cd $LFS</userinput> 9 <para><screen><userinput>cd $LFS</userinput> 14 10 <userinput>mkdir -p bin boot dev/pts etc/opt home lib mnt proc root sbin tmp var opt</userinput> 15 11 <userinput>for dirname in $LFS/usr $LFS/usr/local</userinput> … … 31 27 <userinput>mkdir bin doc include info lib man</userinput> 32 28 <userinput>cd $LFS/usr</userinput> 33 <userinput>ln -s ../var/tmp tmp</userinput> 34 </screen></para> 29 <userinput>ln -s ../var/tmp tmp</userinput></screen></para> 35 30 36 <para> 37 Normally, directories are created with permission mode 755, which isn't 31 <para>Normally, directories are created with permission mode 755, which isn't 38 32 desired for all directories. The first change is a mode 0750 for the 39 33 $LFS/root directory. This is to make sure that not just everybody can … … 42 36 directories. This way, any user can write data to the /tmp or /var/tmp 43 37 directory but cannot remove another user's files (the latter is caused 44 by the so-called "sticky bit" - bit 1 of the 1777 bit mask). 45 </para> 38 by the so-called "sticky bit" - bit 1 of the 1777 bit mask).</para> 46 39 47 <para> 48 <screen> 49 <userinput>cd $LFS &&</userinput> 40 <para><screen><userinput>cd $LFS &&</userinput> 50 41 <userinput>chmod 0750 root &&</userinput> 51 <userinput>chmod 1777 tmp var/tmp</userinput> 52 </screen> 53 </para> 42 <userinput>chmod 1777 tmp var/tmp</userinput></screen></para> 54 43 55 <para> 56 Now that the directories are created, copy the source files that were 44 <para>Now that the directories are created, copy the source files that were 57 45 downloaded in chapter 3 to some subdirectory under $LFS/usr/src (you 58 will need to create the desired directory yourself). 59 </para> 46 will need to create the desired directory yourself).</para> 60 47 61 48 <sect2> 62 49 <title>FHS compliance notes</title> 63 50 64 <para> 65 The FHS stipulates that the /usr/local directory should contain the bin, games, 66 include, lib, man, sbin, and share subdirectories. You can alter your /usr/local 67 directory yourself if you want your system to be FHS-compliant. 68 </para> 51 <para>The FHS stipulates that the /usr/local directory should contain the 52 bin, games,include, lib, man, sbin, and share subdirectories. You can 53 alter your /usr/local directory yourself if you want your system 54 to be FHS-compliant.</para> 69 55 70 <para> 71 Also, the standard says that there should exist a /usr/share/games directory, 72 which we don't much like for a base system. But feel free to make your system 73 FHS-compliant if you wish. The FHS isn't precise as to the structure of the 74 /usr/local/share subdirectories, so we took the liberty of creating the 75 directories that we felt needed. 76 </para> 56 <para>Also, the standard says that there should exist a /usr/share/games 57 directory, which we don't much like for a base system. But feel free to 58 make your system FHS-compliant if you wish. The FHS isn't precise as 59 to the structure of the /usr/local/share subdirectories, so we took the 60 liberty of creating the directories that we felt needed.</para> 77 61 78 62 </sect2>
Note:
See TracChangeset
for help on using the changeset viewer.