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, 2020 in Big Data Hadoop by akhtar
• 38,170 points
433 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, 2020 by MD
• 95,180 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,130 points
4,634 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,620 points
216 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
5,848 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,480 points
851 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,480 points
942 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
3,329 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,480 points
361 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 Oct 13, 2020 in Big Data Hadoop by MD
• 95,180 points
384 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, 2020 in Big Data Hadoop by MD
• 95,180 points
233 views