source: BOOK/boot/common/changingowner.xml@ 66bd602

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 66bd602 was eb55250, checked in by Jim Gifford <clfs@…>, 19 years ago

r1166@server (orig r1164): chris | 2006-02-10 22:07:07 -0800
Added -v to the rest of the temp-system pages, and various other text updates

  • Property mode set to 100644
File size: 2.5 KB
RevLine 
[3f8be484]1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-boot-changingowner">
9 <?dbhtml filename="changingowner.html"?>
10
11 <title>Changing Ownership</title>
12
[bf3dcb3f]13 <para os="a">Currently, the <filename class="directory">/tools</filename>
[6d4c909]14 directory, <filename class="directory">/cross-tools</filename> directory, and
15 <filename class="directory">$LFS</filename> directory are owned
16 by the user <systemitem class="username">lfs</systemitem>,
[bf3dcb3f]17 a user that exists only on the host system. For security reasons, the
18 $LFS root directory and all of it subdirectories should be owned by
19 <systemitem class="username">root</systemitem>. Change the ownership for $LFS and its subdirectories by running these commands:</para>
[6d4c909]20
[eb55250]21<screen><userinput>chown -v root:root ${LFS}
22chown -Rv root:root $LFS/{bin,boot,dev,etc,home,lib,media,mnt,opt,proc,root,sbin,srv,sys,tmp,usr,var}</userinput></screen>
[6d4c909]23
[bf3dcb3f]24 <para os="b">The same issue also exists with <filename class="directory">/tools</filename> and <filename class="directory">/cross-tools</filename>. Although these directories can be deleted once the
[6d4c909]25 LFS system has been finished, they can be retained to build additional
26 LFS systems. If the <filename class="directory">/tools</filename> and <filename class="directory">/cross-tools</filename>
27 directories are kept as is, the files are owned by a user ID without a
[3f8be484]28 corresponding account. This is dangerous because a user account created
29 later could get this same user ID and would own the <filename
[6d4c909]30 class="directory">/tools</filename> and <filename class="directory">/cross-tools</filename> directories and all the files therein,
[3f8be484]31 thus exposing these files to possible malicious manipulation.</para>
32
[bf3dcb3f]33 <para os="c">To avoid this issue, add the <systemitem
[3f8be484]34 class="username">lfs</systemitem> user to the new LFS system later when
35 creating the <filename>/etc/passwd</filename> file, taking care to assign
36 it the same user and group IDs as on the host system. Alternatively,
37 assign the contents of the <filename class="directory">/tools</filename>
[6d4c909]38 and <filename class="directory">/cross-tools</filename> directories to user <systemitem class="username">root</systemitem> by running
[fa6e750]39 the following commands:</para>
[3f8be484]40
[eb55250]41<screen><userinput>chown -Rv root:root /tools
42chown -Rv root:root /cross-tools</userinput></screen>
[6d4c909]43
[3f8be484]44</sect1>
Note: See TracBrowser for help on using the repository browser.