[lfs-dev] 7.5. Creating Directories: Order of mode change descriptions wrong

Kevin Buckley kevin.m.buckley at gmail.com
Tue Jul 21 04:10:26 PDT 2020

Noticed this in r11999  chapter07/creatingdirs.xml

mkdir -pv /usr/{,local/}share/man/man{1..8}
install -dv -m 1777 /tmp /var/tmp
install -dv -m 0750 /root

mkdir -v /var/{log,mail,spool}
ln -sv /run /var/run
ln -sv /run/lock /var/lock
mkdir -pv /var/{opt,cache,lib/{color,misc,locate},local}</userinput></screen>

  <para>Directories are, by default, created with permission mode 755, but
  this is not desirable for all directories. In the commands above, two
  changes are made—one to the home directory of user <systemitem
  class="username">root</systemitem>, and another to the directories for
  temporary files.</para>

  <para>The first mode change ensures that not just anybody can enter
  the <filename class="directory">/root</filename> directory—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.

but note that in the commands,the FIRST mode change is actually
the /tmp /var/tmp one and the SECOND one is for /root.

I'd suggest swapping around the commands, rather that editing the text,
but also note that the commands were in the order matching the text in
LFS 9.1 ?


More information about the lfs-dev mailing list