Restrict write permissions on hive external directories

  • It is possible to restrict the write permissions on hive external directories.
  • This would in turn boost the security of data in Hive
  • We would just need to add Read + Execute permissions to the directory.
  • It is also possible to restrict the access to the files in the ext directory.
  • Even with 444 permissions on the files, Hive would be able to read the data.

CREATE EXTERNAL TABLE extTable(id INT, text STRING)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ‘,’
LOCATION ‘/tmp/extTable’;

hdfs dfs -chmod 555 /tmp/extTable

hdfs dfs -chmod 444 /tmp/extTable/test.csv

 

 

Advertisements

About shalishvj : My Experience with BigData

6+ years of experience using Bigdata technologies in Architect, Developer and Administrator roles for various clients. • Experience using Hortonworks, Cloudera, AWS distributions. • Cloudera Certified Developer for Hadoop. • Cloudera Certified Administrator for Hadoop. • Spark Certification from Big Data Spark Foundations. • SCJP, OCWCD. • Experience in setting up Hadoop clusters in PROD, DR, UAT , DEV environments.
This entry was posted in hive and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s