<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;
]>

<sect1 id="ch-chroot-creatingdirs">
  <?dbhtml filename="creatingdirs.html"?>

  <title>Creating Directories</title>

  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
  href="../../boot/common/creatingdirs.xml"
  xpointer="xpointer(//*[@os='a'])"/>

<screen><userinput>install -dv /{bin,boot,dev,etc/opt,home,lib,mnt}
install -dv /{sbin,srv,usr/local,var,opt,proc,sys}
install -dv /root -m 0750
install -dv /tmp /var/tmp -m 1777
install -dv /media/{floppy,cdrom}
install -dv /usr/{bin,include,lib,sbin,share,src}
ln -sv share/{man,doc,info} /usr
install -dv /usr/share/{doc,info,locale,man}
install -dv /usr/share/{misc,terminfo,zoneinfo}
install -dv /usr/share/man/man{1,2,3,4,5,6,7,8}
install -dv /usr/local/{bin,etc,include,lib,sbin,share,src}
ln -sv share/{man,doc,info} /usr/local
install -dv /usr/local/share/{doc,info,locale,man}
install -dv /usr/local/share/{misc,terminfo,zoneinfo}
install -dv /usr/local/share/man/man{1,2,3,4,5,6,7,8}
install -dv /var/{lock,log,mail,run,spool}
install -dv /var/{opt,cache,lib/{misc,locate},local}
install -dv /opt/{bin,doc,include,info}
install -dv /opt/{lib,man/man{1,2,3,4,5,6,7,8}}</userinput></screen>

  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
  href="../../boot/common/creatingdirs.xml"
  xpointer="xpointer(//*[@os='b'])"/>

  <para os="c">The first mode change ensures that not just anybody can enter
  the <filename class="directory">/root</filename> directory&mdash;the
  same as a normal user would do with his or her home directory. The
  second mode change makes sure that any user can write to the
  <filename class="directory">/tmp</filename> and
  <filename class="directory">/var/tmp</filename> directories, but
  cannot remove another user's files from them. The latter is prohibited
  by the so-called <quote>sticky bit,</quote> the highest bit (1) in the
  1777 bit mask.</para>

  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
  href="../../boot/common/creatingdirs.xml"
  xpointer="xpointer(//*[@os='d'])"/>

</sect1>
