LinuxユーザーとHDFSとHiveの権限関係


1.Linuxユーザーグループとユーザーの新規作成
1)ユーザーグループ
新規:$groupadd hphs
削除コマンド:groupdel;
属性変更:groupmod;
2)ユーザー:
新規:#useradd-d/usr/hphs/-m hphs-g hphs
削除コマンド:userdel;バンド-rはユーザ関連ファイルの削除を表し、バンド-fは強制削除を表す(ユーザがログインしていても)
アカウントの変更:usermod;
パスワード変更:passwd;
3)ユーザーグループとユーザー表示:$cat/etc/passwd
2、HDFSディレクトリ権限を与える:
1)hdfsディレクトリの新規作成:$hadoop fs-mkdir/user/hphs
2)hphs権限付与:$hadoop fs-chown-R hphs:hphs/user/hphs
HDFSアクセス権管理ユーザーズガイドリファレンス:
   http://hadoop.apache.org/docs/r1.0.4/cn/hdfs_permissions_guide.html
3、Hive権限
1)ユーザーレベル権限:オペレーティングシステム上でユーザーがHiveサービスに入るための権限制御は、HDFS権限制御と一致し、ACLサポートである.
    
  
  hive.metastore.execute.setugi  
  true  
  In unsecure mode, setting this property to true will cause the metastore to execute DFS operations using the client's reported user and group permissions. Note that this property must be set on both the client and server sides. Further note that its best effort. If client sets its to true and server sets it to false, client setting will be ignored.     ,hadoop      (   kerborers  ) ,  hive                hdfs  
  

2)SQL操作権限:Hiveデータベース自身の役割の権限管理、異なるデータベースと表が具体的な権限を与える操作
   
   hive.security.authorization.enabled   
   true   
   enable or disable the hive client authorization.         
   
   
   hive.security.authorization.createtable.owner.grants   
   ALL   
   the privileges automatically granted to the owner whenever a table gets created. An example like "select,drop" will grant select and drop privilege to the owner of the table.             .  
     
  

実際に生産が直面している問題は、
1)linuxユーザーとユーザーグループを新規作成し、Hadoopでその権限をどのように設定するか、Hadoopコマンドの実行を許可するか.もう1つは、特定のHDFSパスを制御することである.これはACL制御のはずです.
2)linuxユーザーとユーザーグループを新規作成し、Hiveでその権限をどのように設定するか、自分でhiveコマンドを許可するか.もう1つは、特定のhiveファイルのパスを制御することです(これはHadoopと一致するはずです).もう1つは、特定のライブラリとテーブルの使用権限です.
マルチユーザがhadoopとHive(さらに同じクライアント)を使用することを効果的に管理する方法を決定し,特にhadoopクラスタがkerberosセキュリティ認証を設定する下で,引き続き検討する必要がある.
これまでの研究の成果は、引き続き最適化される必要があります.
http://blog.csdn.net/fjssharpsword/article/details/51280335
http://blog.csdn.net/fjssharpsword/article/details/51312153