forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Yang, Tong <yangtong2@huawei.com> Co-committed-by: Yang, Tong <yangtong2@huawei.com>
19 lines
2.4 KiB
HTML
19 lines
2.4 KiB
HTML
<a name="mrs_01_0797"></a><a name="mrs_01_0797"></a>
|
|
|
|
<h1 class="topictitle1">Configuring HDFS Directory Permission</h1>
|
|
<div id="body1590130532441"><div class="section" id="mrs_01_0797__s926c579fe1384b1083423933384fd908"><h4 class="sectiontitle">Scenario</h4><p id="mrs_01_0797__a277b352383a642e8847529d4d747cbae">The permission for some HDFS directories is <strong id="mrs_01_0797__b154035169212">777</strong> or <strong id="mrs_01_0797__b84521518172111">750</strong> by default, which brings potential security risks. You are advised to modify the permission for the HDFS directories after the HDFS is installed to increase user security.</p>
|
|
</div>
|
|
<div class="section" id="mrs_01_0797__s57b69cece1474688b28c11108f534a4a"><h4 class="sectiontitle">Procedure</h4><p id="mrs_01_0797__a0b00636c8f2a402eb3b1c9afa4bd935b">Log in to the HDFS client as the administrator and run the following command to modify the permission for the <span class="filepath" id="mrs_01_0797__filepath1179118595567"><b>/user</b></span> directory.</p>
|
|
</div>
|
|
<p id="mrs_01_0797__a42e6cb20fff74aef8cab704e89ff0db8">The permission is set to <strong id="mrs_01_0797__b10194115952319">1777</strong>, that is, <strong id="mrs_01_0797__b550916117249">1</strong> is added to the original permission. This indicates that only the user who creates the directory can delete it.</p>
|
|
<p id="mrs_01_0797__a139740c70cb94d66a177b1e776522bca"><strong id="mrs_01_0797__a8feb31fccdae4a9c9eb039ff18229d94">hdfs dfs -chmod 1777 </strong><em id="mrs_01_0797__a8675a4a5fc504c71a1bf3ae15bd8603d">/<em id="mrs_01_0797__i12482175995120">user</em></em></p>
|
|
<p id="mrs_01_0797__a25be1d0d3cb24b948c024ab4ea2b9d0d">To ensure security of the system file, you are advised to harden the security for non-temporary directories. The following directories are examples:</p>
|
|
<ul id="mrs_01_0797__u43e43c8802c24fb6a2e643d9a94382a7"><li id="mrs_01_0797__l9d2fbb937af2496d968ebd4756963b5d">/user:777</li><li id="mrs_01_0797__l80dc102307bd4c2f9eb5f3a9d22c8cc5">/mr-history:777</li><li id="mrs_01_0797__l23565630e7e04add831dd216202f1429">/mr-history/tmp:777</li><li id="mrs_01_0797__l3272e1ab4a6e47fe87cd425586993bb9">/mr-history/done:777</li><li id="mrs_01_0797__l89ad89f7e3874a1db07ddaef4d60ea57">/user/mapred:755</li></ul>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_0790.html">Using HDFS</a></div>
|
|
</div>
|
|
</div>
|
|
|