[d2c332bc] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[b06ca36] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[d2c332bc] | 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 |
|
---|
[07e8db2] | 21 | <para>Currently, the <filename class="directory">$LFS/tools</filename> directory
|
---|
[d2c332bc] | 22 | is owned by the user <systemitem class="username">lfs</systemitem>, a user
|
---|
| 23 | that exists only on the host system. If the <filename
|
---|
[07e8db2] | 24 | class="directory">$LFS/tools</filename> directory is kept as is, the files are
|
---|
[d2c332bc] | 25 | owned by a user ID without a corresponding account. This is dangerous because
|
---|
| 26 | a user account created later could get this same user ID and would own the
|
---|
[07e8db2] | 27 | <filename class="directory">$LFS/tools</filename> directory and all the files
|
---|
[d2c332bc] | 28 | therein, thus exposing these files to possible malicious manipulation.</para>
|
---|
| 29 |
|
---|
| 30 | <para>To avoid this issue, you could add the <systemitem
|
---|
| 31 | class="username">lfs</systemitem> user to the new LFS system later when
|
---|
| 32 | creating the <filename>/etc/passwd</filename> file, taking care to assign it
|
---|
| 33 | the same user and group IDs as on the host system. Better yet, change the
|
---|
[07e8db2] | 34 | ownership of the <filename class="directory">$LFS/tools</filename> directory to
|
---|
[d2c332bc] | 35 | user <systemitem class="username">root</systemitem> by running the following
|
---|
| 36 | command:</para>
|
---|
| 37 |
|
---|
[07e8db2] | 38 | <screen><userinput>chown -R root:root $LFS/tools</userinput></screen>
|
---|
[d2c332bc] | 39 |
|
---|
[07e8db2] | 40 | <para>Although the <filename class="directory">$LFS/tools</filename> directory
|
---|
| 41 | can be deleted once the LFS system has been finished, it can be retained to build
|
---|
[d2c332bc] | 42 | additional LFS systems <emphasis>of the same book version</emphasis>. How best
|
---|
[07e8db2] | 43 | to backup <filename class="directory">$LFS/tools</filename> is a matter of
|
---|
[d2c332bc] | 44 | personal preference and is left as an exercise for the reader.</para>
|
---|
| 45 |
|
---|
[948bdb9] | 46 | <caution>
|
---|
| 47 | <para>If you intend to keep the temporary tools for use in building future LFS
|
---|
| 48 | systems, <emphasis>now</emphasis> is the time to back them up. Subsequent
|
---|
| 49 | commands in chapter 6 will alter the tools currently in place, rendering them
|
---|
| 50 | useless for future builds.</para>
|
---|
| 51 | </caution>
|
---|
| 52 |
|
---|
[d2c332bc] | 53 | </sect1>
|
---|