source: chapter06/creatingdirs.xml@ c2133bc

Last change on this file since c2133bc was c2133bc, checked in by Manuel Canales Esparcia <manuel@…>, 19 years ago

Upgraded to DocBook 4.4 DTD

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/multi-arch/BOOK@4605 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 3.0 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
3 <!ENTITY % general-entities SYSTEM "../general.ent">
4 %general-entities;
5]>
6<sect1 id="ch-system-creatingdirs">
7<title>Creating Directories</title>
8<?dbhtml filename="creatingdirs.html"?>
9
10<para>It is time to create some structure in the LFS file system.
11Create a directory tree. Issuing the following commands will create a
12standard tree:</para>
13
14<screen><userinput>install -d /{bin,boot,dev,etc/opt,home,lib,mnt}
15install -d /{sbin,srv,usr/local,var,opt}
16install -d /root -m 0750
17install -d /tmp /var/tmp -m 1777
18install -d /media/{floppy,cdrom}
19install -d /usr/{bin,include,lib,sbin,share,src}
20ln -s share/{man,doc,info} /usr
21install -d /usr/share/{doc,info,locale,man}
22install -d /usr/share/{misc,terminfo,zoneinfo}
23install -d /usr/share/man/man{1,2,3,4,5,6,7,8}
24install -d /usr/local/{bin,etc,include,lib,sbin,share,src}
25ln -s share/{man,doc,info} /usr/local
26install -d /usr/local/share/{doc,info,locale,man}
27install -d /usr/local/share/{misc,terminfo,zoneinfo}
28install -d /usr/local/share/man/man{1,2,3,4,5,6,7,8}
29install -d /var/{lock,log,mail,run,spool}
30install -d /var/{opt,cache,lib/{misc,locate},local}
31install -d /opt/{bin,doc,include,info}
32install -d /opt/{lib,man/man{1,2,3,4,5,6,7,8}}</userinput></screen>
33
34<para arch="raq2">FIXME. Some explanation is needed here for the next commands.</para>
35
36<screen arch="raq2"><userinput>cd /boot
37ln -s . boot</userinput></screen>
38
39<para>Directories are, by default, created with permission mode 755,
40but this is not desirable for all directories. In the commands above,
41two changes are made&mdash;one to the home directory of user
42<emphasis>root</emphasis>, and another to the directories for
43temporary files.</para>
44
45<para>The first mode change ensures that not just anybody can enter
46the <filename class="directory">/root</filename> directory&mdash;the same
47as a normal user would do with his or her home directory. The second
48mode change makes sure that any user can write to the <filename
49class="directory">/tmp</filename> and <filename
50class="directory">/var/tmp</filename> directories, but cannot remove
51other users' files from them. The latter is prohibited by the
52so-called <quote>sticky bit,</quote> the highest bit (1) in the 1777
53bit mask.</para>
54
55<beginpage/>
56<sect2>
57<title>FHS Compliance Note</title>
58
59<para>The directory tree is based on the Filesystem Hierarchy Standard
60(FHS) standard (available at <ulink
61url="http://www.pathname.com/fhs/"/>). Besides the tree created above,
62this standard stipulates the existence of <filename
63class="directory">/usr/local/games</filename> and <filename
64class="directory">/usr/share/games</filename>. We do not recommend
65these for a base system, however, feel free to make the system
66FHS-compliant. The FHS is not precise as to the structure of the
67<filename class="directory">/usr/local/share</filename> subdirectory,
68so we created only the directories that are needed.</para>
69
70</sect2>
71
72</sect1>
73
Note: See TracBrowser for help on using the repository browser.