Changing ownership
Right now the /stage1 directory is owned by the lfs user. However,
this user account exists only on the host system. Although you may delete
the /stage1 directory once you have
finished your LFS system, you might want to keep it around, e.g. for
building more LFS systems. But if you keep the
/stage1 directory you will end up
with files owned by a user id without a corresponding account. This is
dangerous because a user account created later could get this user id and
would suddenly own the /stage1
directory and all of the files therein. This could open the
/stage1 directory to manipulation by
an untrusted user.
To avoid this issue, you can add the
lfs user to the new LFS system later when creating
the /etc/passwd file, taking care to assign it the
same user and group id. Alternatively, you can (and the book will assume
you do) run the following command now, to assign the contents of the
/stage1 directory to user
root by running the following command:
chown -R 0:0 /stage1
The command uses "0:0" instead of "root:root", because chown is unable
to resolve the name "root" until glibc has been installed.