From fcc027677da55c41dcaea045f5b9ff8b088e6495 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Sun, 7 Jun 2020 20:16:00 +0000 Subject: Initial commit of alternative cross LFS git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/cross2@11897 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter07/creatingdirs.xml | 59 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 chapter07/creatingdirs.xml (limited to 'chapter07/creatingdirs.xml') diff --git a/chapter07/creatingdirs.xml b/chapter07/creatingdirs.xml new file mode 100644 index 000000000..359717ff7 --- /dev/null +++ b/chapter07/creatingdirs.xml @@ -0,0 +1,59 @@ + + + %general-entities; +]> + + + + + Creating Directories + + It is time to create the full structure in the LFS file system. Create + a standard directory tree by issuing the following commands: + +mkdir -pv /{bin,boot,etc/{opt,sysconfig},home,lib/firmware,mnt,opt} +mkdir -pv /{media/{floppy,cdrom},srv,var} +install -dv -m 0750 /root +install -dv -m 1777 /tmp /var/tmp +mkdir -pv /usr/{,local/}{bin,include,lib,sbin,src} +mkdir -pv /usr/{,local/}share/{color,dict,doc,info,locale,man} +mkdir -pv /usr/{,local/}share/{misc,terminfo,zoneinfo} +mkdir -pv /usr/{,local/}share/man/man{1..8} + +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} + + 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 root, and another to the directories for + temporary files. + + The first mode change ensures that not just anybody can enter + the /root 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 + /tmp and /var/tmp directories, but cannot remove + another user's files from them. The latter is prohibited by the so-called + sticky bit, the highest bit (1) in the 1777 bit mask. + + + FHS Compliance Note + + The directory tree is based on the Filesystem Hierarchy Standard + (FHS) (available at ). The FHS also specifies + the optional existence of some directories such as /usr/local/games and /usr/share/games. We create only the + directories that are needed. However, feel free to create these + directories. + + + + -- cgit v1.2.3-54-g00ecf