uTools-Manuals/docs/linux/dpkg-statoverride.html
2019-04-21 11:50:48 +08:00

20 lines
1.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1 id="dpkg-statoverride">dpkg-statoverride</h1>
<p>Debian Linux中覆盖文件的所有权和模式</p>
<h2 id="补充说明">补充说明</h2>
<p><strong>dpkg-statoverride命令</strong> 用于Debian Linux中覆盖文件的所有权和模式让dpkg于包安装时使得文件所有权与模式失效。</p>
<h3 id="语法">语法</h3>
<pre><code class="language-bash">dpkg-statoverride(选项)</code></pre>
<h3 id="选项">选项</h3>
<pre><code class="language-bash">-add为文件添加一个改写
--remove为文件删除一个改写
--list显示所有改写列表
--update如果文件存在则立刻执行改写操作。</code></pre>
<h3 id="实例">实例</h3>
<p>修改文件夹的权限属性:</p>
<pre><code class="language-bash">sudo dpkg-statoverride --update --add nagios nagios 751 /var/lib/nagios3</code></pre>
<p>强制修改文件夹的权限属性:</p>
<pre><code class="language-bash">sudo dpkg-statoverride --force --update --add root sasl 755 /var/spool/postfix/var/run/saslauthd</code></pre>
<p>将文件从数据库中删除:</p>
<pre><code class="language-bash">sudo dpkg-statoverride --remove /usr/bin/wall</code></pre>
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->