Hadoop security-hftp

Source: Internet
Author: User
Tags hadoop fs

Hadoop security-hftp

By default, hftp is enabled, allowing you to access and download files in a browser. In this way, you can read all files, leaving a security risk.

The test is as follows:

/User/hive/warehouse/cdntest. the owner of the parent directory selfreadonly of db/selfreadonly/hosts is zhouyang and the permission is 700. However, if bkjia Users enter the following address in the browser, they can download the file.
Http: // localhost: 50070/webhdfs/v1/user/hive/warehouse/cdntest. db/selfreadonly/hosts? Op = OPEN & offset = 0 & length = 1024

Add the following configuration to the hdfs-site.xml to disable webhdfs

<Property>
<Name> dfs. webhdfs. enabled </name>
<Value> false </value>
</Property>

After webhdfs is disabled, the hftp protocol can be used. The test is as follows:
[Bkjia @ localhost ~] $ Hadoop fs-ls hftp: /localhost: 50070/user/hive/warehouse/cdntest. db/selfreadonly
Ls: user = bkjia, access = READ_EXECUTE, inode = "/user/hive/warehouse/cdntest. db/selfreadonly": zhouyang: cdn: drwx ------
[Bkjia @ localhost ~] $ Hadoop fs-ls hftp: /localhost: 50070/user/hive/warehouse/cdntest. db
Found 4 items
Drwx -------zhouyang cdn 0 hftp: // localhost: 50070/user/hive/warehouse/cdntest. db/selfreadonly
Drwxrwxr-x-wangjing cdn 0 hftp: // localhost: 50070/user/hive/warehouse/cdntest. db/testp1
Drwxrwx ----cdn 0 hftp: // localhost: 50070/user/hive/warehouse/cdntest. db/testp2
Drwxrwxr-x-wangjing cdn 0 hftp: // localhost: 50070/user/hive/warehouse/cdntest. db/wangjing


/User/hive/warehouse/cdntest. the owner of the parent directory selfreadonly of db/selfreadonly/hosts is zhouyang and the permission is 700. However, if bkjia Users enter the following address in the browser, they can download the file.

Http: // localhost: 50070/webhdfs/v1/user/hive/warehouse/cdntest. db/selfreadonly/hosts? Op = OPEN & offset = 0 & length = 1024
After webhdfs is disabled, the hftp protocol can continue to be used.
[Bkjia @ localhost ~] $ Hadoop fs-ls hftp: /localhost: 50070/user/hive/warehouse/cdntest. db/selfreadonly
Ls: user = bkjia, access = READ_EXECUTE, inode = "/user/hive/warehouse/cdntest. db/selfreadonly": zhouyang: cdn: drwx ------
[Bkjia @ localhost ~] $ Hadoop fs-ls hftp: /localhost: 50070/user/hive/warehouse/cdntest. db
Found 4 items
Drwx -------zhouyang cdn 0 hftp: // localhost: 50070/user/hive/warehouse/cdntest. db/selfreadonly
Drwxrwxr-x-wangjing cdn 0 hftp: // localhost: 50070/user/hive/warehouse/cdntest. db/testp1
Drwxrwx ----cdn 0 hftp: // localhost: 50070/user/hive/warehouse/cdntest. db/testp2
Drwxrwxr-x-wangjing cdn 0 hftp: // localhost: 50070/user/hive/warehouse/cdntest. db/wangjing

Tutorial on standalone/pseudo-distributed installation and configuration of Hadoop2.4.1 under Ubuntu14.04

Install and configure Hadoop2.2.0 on CentOS

Build a Hadoop environment on Ubuntu 13.04

Cluster configuration for Ubuntu 12.10 + Hadoop 1.2.1

Build a Hadoop environment on Ubuntu (standalone mode + pseudo Distribution Mode)

Configuration of Hadoop environment in Ubuntu

Detailed tutorial on creating a Hadoop environment for standalone Edition

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.