1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 | ]>
|
---|
7 |
|
---|
8 | <sect1 id="ch-chroot-creatingdirs">
|
---|
9 | <?dbhtml filename="creatingdirs.html"?>
|
---|
10 |
|
---|
11 | <title>Creating Directories</title>
|
---|
12 |
|
---|
13 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
14 | href="../../boot/common/creatingdirs.xml"
|
---|
15 | xpointer="xpointer(//*[@os='a'])"/>
|
---|
16 |
|
---|
17 | <screen os="b"><userinput>mkdir -pv /{bin,boot,dev,{etc/,}opt,home,lib,mnt}
|
---|
18 | mkdir -pv /{proc,media/{floppy,cdrom},sbin,srv,sys}
|
---|
19 | mkdir -pv /var/{lock,log,mail,run,spool}
|
---|
20 | mkdir -pv /var/{opt,cache,lib/{misc,locate},local}
|
---|
21 | install -dv -m 0750 /root
|
---|
22 | install -dv -m 1777 {/var,}/tmp
|
---|
23 | mkdir -pv /usr/{,local/}{bin,include,lib,sbin,src}
|
---|
24 | mkdir -pv /usr/{,local/}share/{doc,info,locale,man}
|
---|
25 | mkdir -pv /usr/{,local/}share/{misc,terminfo,zoneinfo}
|
---|
26 | mkdir -pv /usr/{,local/}share/man/man{1..8}
|
---|
27 | for dir in /usr{,/local}; do
|
---|
28 | ln -sv share/{man,doc,info} $dir
|
---|
29 | done</userinput></screen>
|
---|
30 |
|
---|
31 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
32 | href="../../boot/common/creatingdirs.xml"
|
---|
33 | xpointer="xpointer(//*[@os='c'])"/>
|
---|
34 |
|
---|
35 | <para os="d">The first mode change ensures that not just anybody can enter
|
---|
36 | the <filename class="directory">/root</filename> directory—the
|
---|
37 | same as a normal user would do with his or her home directory. The
|
---|
38 | second mode change makes sure that any user can write to the
|
---|
39 | <filename class="directory">/tmp</filename> and
|
---|
40 | <filename class="directory">/var/tmp</filename> directories, but
|
---|
41 | cannot remove another user's files from them. The latter is prohibited
|
---|
42 | by the so-called <quote>sticky bit,</quote> the highest bit (1) in the
|
---|
43 | 1777 bit mask.</para>
|
---|
44 |
|
---|
45 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
46 | href="../../boot/common/creatingdirs.xml"
|
---|
47 | xpointer="xpointer(//*[@os='e'])"/>
|
---|
48 |
|
---|
49 | </sect1>
|
---|