Change the owner and group of a file in Hadoop.

0 votes

Hi Guys,

I have some files in HDFS Cluster. I want to change the owner of the files. How can I do that?

Oct 1 in Big Data Hadoop by akhtar
• 27,980 points
38 views

1 answer to this question.

0 votes

Hi@akhtar,

You can use the Chown command. This command is used to change the owner and group of a file. This command is similar to the shell’s chown command with a few exceptions. If only the owner of the group is specified then only the owner of the group is modified via this command. The owner and group names may only consist of digits, alphabets, and any of the characters mentioned here [-_./@a-zA-Z0-9]. The names thus specified are case sensitive as well. You can see the below syntax.

$ hadoop fs -chown [-R] [OWNER][:[GROUP]] PATH
answered Oct 1 by MD
• 64,820 points

Related Questions In Big Data Hadoop

0 votes
1 answer

How to check the size of a file in Hadoop HDFS?

You can use the  hadoop fs -ls command to ...READ MORE

answered Nov 21, 2018 in Big Data Hadoop by Omkar
• 69,030 points
3,056 views
0 votes
1 answer

Method to schedule the number of Mappers and Reducers in a Hadoop MapReduce Tsk.

The number of Mapper tasks for a ...READ MORE

answered Apr 25, 2019 in Big Data Hadoop by ravikiran
• 4,600 points
135 views
0 votes
1 answer

What is the use of sequence file in Hadoop?

Sequence files are binary files containing serialized ...READ MORE

answered Apr 5, 2018 in Big Data Hadoop by Ashish
• 2,650 points
4,440 views
0 votes
1 answer

What is the command to find the free space in HDFS?

You can use dfsadmin which runs a ...READ MORE

answered Apr 29, 2018 in Big Data Hadoop by Shubham
• 13,450 points
628 views
0 votes
1 answer

How to find the used cache in HDFS

hdfs dfsadmin -report This command tells fs ...READ MORE

answered May 4, 2018 in Big Data Hadoop by Shubham
• 13,450 points
692 views
+1 vote
2 answers

What does hadoop fs -du command gives as output?

du command is used for to see ...READ MORE

answered Jul 23, 2019 in Big Data Hadoop by Lokesh Singh
2,541 views
0 votes
1 answer

How can I write text in HDFS using CMD?

Hadoop put & appendToFile only reads standard ...READ MORE

answered Apr 27, 2018 in Big Data Hadoop by Shubham
• 13,450 points
251 views
0 votes
1 answer

How to find the number of blocks for a file in Hadoop?

Hi@akhtar, You can use Hadoop file system command to ...READ MORE

answered 6 days ago in Big Data Hadoop by MD
• 64,820 points
36 views
0 votes
1 answer

Change permissions of a file in HDFS.

Hi@akhtar, You can use the Chmod command to ...READ MORE

answered Oct 1 in Big Data Hadoop by MD
• 64,820 points
27 views