⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 changingowner.html

📁 CLFS(Cross-Compiled Linux From Scratch)的文档 Version CLFS-SVN-20060417
💻 HTML
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml">  <head>    <meta http-equiv="Content-Type" content=    "application/xhtml+xml; charset=iso-8859-1" />    <title>      8.5.&nbsp;Changing Ownership    </title>    <link rel="stylesheet" href="../stylesheets/lfs.css" type="text/css" />    <meta name="generator" content="DocBook XSL Stylesheets V1.69.1" />    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=    "text/css" media="print" />  </head>  <body id="lfs" class="CLFS-SVN-20060417-MIPS">    <div class="navheader">      <div class="headertitles">        <h4>          Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-MIPS        </h4>        <h3>          Chapter&nbsp;8.&nbsp;If You Are Going to Chroot        </h3>      </div>      <ul class="headerlinks">        <li class="prev">          <a accesskey="p" href="chroot.html" title=          "Entering the Chroot Environment">Prev</a>          <p>            Entering the Chroot Environment          </p>        </li>        <li class="next">          <a accesskey="n" href="creatingdirs.html" title=          "Creating Directories">Next</a>          <p>            Creating Directories          </p>        </li>        <li class="up">          <a accesskey="u" href="chapter.html" title=          "Chapter&nbsp;8.&nbsp;If You Are Going to Chroot">Up</a>.        </li>        <li class="home">          <a accesskey="h" href="../index.html" title=          "Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-MIPS">          Home</a>        </li>      </ul>    </div>    <div class="sect1" lang="en" xml:lang="en">      <div class="titlepage">        <h1 class="sect1">          8.5. Changing Ownership        </h1>      </div>      <p>        Currently, the <tt class="filename">/tools</tt> and <tt class=        "filename">/cross-tools</tt> directories are owned by the user        <span class="emphasis"><em>lfs</em></span>, a user that exists only        on the host system. Although the <tt class="filename">/tools</tt> and        <tt class="filename">/cross-tools</tt> directories can be deleted        once the LFS system has been finished, they can be retained to build        additional LFS systems. If the <tt class="filename">/tools</tt> and        <tt class="filename">/cross-tools</tt> directories are kept as is,        the files are owned by a user ID without a corresponding account.        This is dangerous because a user account created later could get this        same user ID and would own the <tt class="filename">/tools</tt>        directory and all the files therein, thus exposing these files to        possible malicious manipulation.      </p>      <p>        To avoid this issue, add the <tt class="systemitem">lfs</tt> user to        the new LFS system later when creating the <tt class=        "filename">/etc/passwd</tt> file, taking care to assign it the same        user and group IDs as on the host system. Alternatively, assign the        contents of the <tt class="filename">/tools</tt> and <tt class=        "filename">/cross-tools</tt> directories to user <tt class=        "systemitem">root</tt> by running the following commands:      </p>      <pre class="userinput"><kbd class="command">chown -Rv 0:0 /toolschown -Rv 0:0 /cross-tools</kbd></pre>      <p>        The commands use <em class="parameter"><tt>0:0</tt></em> instead of        <em class="parameter"><tt>root:root</tt></em>, because        <span><strong class="command">chown</strong></span> is unable to        resolve the name &ldquo;<span class="quote">root</span>&rdquo; until        the <tt class="filename">passwd</tt> file has been created.      </p>    </div>    <div class="navfooter">      <ul>        <li class="prev">          <a accesskey="p" href="chroot.html" title=          "Entering the Chroot Environment">Prev</a>          <p>            Entering the Chroot Environment          </p>        </li>        <li class="next">          <a accesskey="n" href="creatingdirs.html" title=          "Creating Directories">Next</a>          <p>            Creating Directories          </p>        </li>        <li class="up">          <a accesskey="u" href="chapter.html" title=          "Chapter&nbsp;8.&nbsp;If You Are Going to Chroot">Up</a>.        </li>        <li class="home">          <a accesskey="h" href="../index.html" title=          "Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-MIPS">          Home</a>.        </li>      </ul>    </div>  </body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -