Why does "hadoop fs -mkdir" fail with Permission Denied?

I am using Cloudera on a VM machine that I am playing around with. Unfortunately I am having issues copying data to the HDFS, I am getting the following:

[cloudera@localhost ~]$ hadoop fs -mkdir input
mkdir: Permission denied: user=cloudera, access=WRITE, inode="/user":hdfs:supergroup:drwxr-xr-x

I am not too concerned about security on this VM, is there anyway I can open up security more on HDFS?

Using mkdir in hadoop needs the "hadoop file permissions". From your example you can see that hdfs is a user that has permissions to create folders. So if you run:

sudo -u hdfs hadoop fs -mkdir /import

then the import folder will be created. If you want to change the owner of this folder run:

sudo -u hdfs hadoop fs -chown new_user /import

Now the new_user can manipulate files inside the import folder

Why do some COVID-19 patients infect many others, whereas most , Science 's COVID-19 reporting is supported by the Pulitzer Center. When 61 people met for a choir practice in a church in Mount Vernon,� Does it take you forever to make a doctor’s appointment, clean out your garage, or do your taxes? Putting off something that needs to be done is called procrastination.We all do it sometimes.

When you execute the above command, if hdfs home directory(/user/cloudera) is not there then that directory will be created first then the directory input will be created under /user/cloudera

For giving permission for cloudera user to create it's own directory, you got to give permission. hdfs user is the admin user in hdfs switch to hdfs then execute the following command

[hdfs@localhost~]$ hadoop fs -mkdir /user/cloudera ; hadoop fs -chmod 777  /user/cloudera

Or

if you are not too concerned about hdfs security you disable hdfs permission by setting the below property to false in hdfs-site.xml

<property>
<name>dfs.permissions.enabled</name>
<value>false</value>
</property>

after setting this property to false hdfs needs to be restarted.

Why Does My Hip Hurt? 4 Possible Causes and Treatments, When your hipbone is pinged with pain, you may find it difficult to stand, walk, run or engage in other routine activities. “Hip pain can become� Why do you press harder on a remote-control when you know the battery is dead? Why is it that in the US: If you take off all your clothes and walk down the street waving a machete and firing an Uzi, terrified citizens will phone the police and report: "There's a naked person outside!"

In cloudera manager, you can change the settings: hdfs->configuration->view&edit, uncheck the Check HDFS Permissions dfs.permissions and restart the hdfs.

Why does coronavirus kill some people and spare others?, Scientists are exploring genetic factors, including a person's blood type, how the virus is transmitted, and whether particular strains might be� Why Does Trump Lie? It’s mortifying enough to imagine the damage he can do in the next five months, let alone the following four years if he’s re-elected.

This is because you dont have enough permission to create directory in hdfs. Try running this as sudo:

sudo -u hdfs hadoop fs -mkdir -p /user/samplefolder

But this is not recommended because it compromises security.

COVID-19 Testing: Understanding the “Percent Positive”, What is the “percent positive” and why does it matter? The percent positive is exactly what it sounds like: the percentage of all coronavirus tests� No one knows what causes this, which your doctor might call blepharospasm.When it happens, your eyelid, usually the upper one, blinks and you can’t make it stop.

I resolved the issue by creating a supergroup in /etc/group and updated the user logins on it. I mean user should be part of HDFS supergroup to have access to write on HDFS.

$vi /etc/group

supergroup:x:30000:root

Later was able to write on HDFS. Hope it helps

Vaccine Effectiveness: How Well Do the Flu Vaccines Work?, Why are confidence intervals important for understanding flu vaccine effectiveness? Is it true that getting vaccinated repeatedly can reduce vaccine effectiveness? This article provides you with procedures to investigate why Access may be requesting a parameter value and how you can stop the requests. Note: This article doesn’t apply to Access web apps – the type of database you design with Access and publish online to Microsoft 365 or SharePoint.

Coronavirus (COVID-19) frequently asked questions, Why is the disease being called coronavirus disease 2019, COVID-19? Can mosquitoes or ticks spread the virus that causes COVID-19? I don’t know why (actually, I do know why, and I’ll get into that), but some people really hate The Legend of Korra. For those who don’t know and are just finishing Avatar: The Last

No. 424: Why Does? Why Is?, Why Do Clocks run Clockwise? asks the title of a book by David Feldman. Why indeed! This odd book looks at 239 such questions. First they look innocent� It's an unpleasant reality: Coffee can make you poop soon after drinking it. But why does coffee make you poop almost immediately? Gastroenterologists explain coffee's affect on your digestive system.

[PDF] Why does Sargassum smell so bad?, Hydrogen sulfide has a very unpleasant odor, like rotten eggs. Although the seaweed itself cannot harm your health, tiny sea creatures that live in Sargassum can� Assessment is an integral part of instruction, as it determines whether or not the goals of education are being met. Assessment affects decisions about grades, placement, advancement, instructional needs, curriculum, and, in some cases, funding.

Comments
  • if i run that command I get: [cloudera@localhost ~]$ hadoop fs -mkdir /user/cloudera ; hadoop fs -chmod 777 /user/cloudera mkdir: Permission denied: user=cloudera, access=WRITE, inode="/user":hdfs:supergroup:drwxr-xr-x chmod: `/user/cloudera': No such file or directory
  • Before executing the above command you got to switch the user to hdfs user.. Use the command su hdfs
  • Or disable hdfs permission by following the second step