source: chapter05/changingowner.xml@ efcb393

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since efcb393 was efcb393, checked in by Pierre Labastie <pieere@…>, 4 years ago

Make the new book

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/cross-chap5@11831 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 1.9 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-tools-changingowner">
9 <?dbhtml filename="changingowner.html"?>
10
11 <title>Changing Ownership</title>
12
13 <note>
14 <para>The commands in the remainder of this book must be performed while
15 logged in as user <systemitem class="username">root</systemitem> and no
16 longer as user <systemitem class="username">lfs</systemitem>. Also, double
17 check that <envar>$LFS</envar> is set in <systemitem
18 class="username">root</systemitem>'s environment.</para>
19 </note>
20
21 <para>Currently, the whole directory hierarchy in <filename
22 class="directory">$LFS</filename>
23 is owned by the user <systemitem class="username">lfs</systemitem>, a user
24 that exists only on the host system. If the directories under <filename
25 class="directory">$LFS</filename> are kept as they are, the files are
26 owned by a user ID without a corresponding account. This is dangerous because
27 a user account created later could get this same user ID and would own all
28 the files under <filename class="directory">$LFS</filename>, thus exposing
29 these files to possible malicious manipulation.</para>
30
31 <para>To avoid this issue, you could add the <systemitem
32 class="username">lfs</systemitem> user to the new LFS system later when
33 creating the <filename>/etc/passwd</filename> file, taking care to assign it
34 the same user and group IDs as on the host system. Better yet, change the
35 ownership of the <filename class="directory">$LFS/*</filename> directories to
36 user <systemitem class="username">root</systemitem> by running the following
37 command:</para>
38
39<screen><userinput>chown -R root:root $LFS/{usr,lib,var,etc,bin,sbin,lib64,tools}</userinput></screen>
40
41</sect1>
Note: See TracBrowser for help on using the repository browser.