Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  

Hadoop upload file to HDFS permission denied



Share on Google+Share on Google+

Java Coder
Hadoop upload file to HDFS permission denied
4 Answer(s)      2 months and 9 days ago
Posted in : Big Data


I am trying to upload a file on Hadoop HDFS with the command:

hadoop fs -put test.txt /mydir/

But its throwing following error:

mkdir: Permission denied: user=root, access=WRITE,inode="/mydir/":hdfs:hdfs:drwxr-xr-x

What is this error and how to resolve it?


View Answers

May 14, 2017 at 7:17 PM


This error is due to the fact that current user "root" does not have permission to write on the HDFS.

The directory of HDFS is owned by the user "hdfs" with the 755 permission. You will be able to upload file if you chage user to hdfs with following command:

su hdfs

After running this on console you run command to upload file and it will be uploaded correctly.

Hope this helps.

Deepak Kumar

May 14, 2017 at 7:19 PM


You will find all important commands of Hadoop at the tutorial page: Hadoop shell commands.

Learn Hadoop command with the help of above tutorial.


May 14, 2017 at 7:24 PM


You can also disable security if you are in development environment with adding following property:


In the hdfs-site.xml file.

But this is not recommended in production environment.


May 14, 2017 at 7:40 PM


Are you in search of Big Data and Hdoop tutorials? Looking for examples of Hadoop and Big Data Analytics.

Check Big Data tutorials, technologies, questions and answers.

On the above page you will find many tutorials.



Related Tutorials/Questions & Answers:
Hadoop upload file to HDFS permission denied
Hadoop upload file to HDFS permission denied  Hi, I am trying to upload a file on Hadoop HDFS with the command: hadoop fs -put test.txt /mydir... is owned by the user "hdfs" with the 755 permission. You will be able to upload file
hadoop fs permission denied
: hadoop fs permission denied [email protected]:/home/deepak# hadoop fs -mkdir /test mkdir: Permission denied: user=root, access=WRITE, inode="/test":hdfs:hdfs:drwxr...hadoop fs permission denied  Hi, I am trying to make a directory
How to upload and download file in hadoop?
How to upload and download file in hadoop?  Hi, I am trying to learn to upload the file on the Hadoop HDFS and then download the same file for learning the process. How to upload and download file in hadoop? What
change file permission in php
change file permission in php  How to change file permission in PHP
java get file permission
java get file permission  How to check the get file permission in Java
Hadoop shell commands
the content of root of HDFS following command is used: hadoop fs -ls / 4. Upload file in HDFS Hadoop HDFS is file system and you can upload and download the file from the HDFS. To upload the file following command is used: hadoop fs -put <
File Upload
File Upload  when i execute the image upload to mysql database it shows an exception that file path cannot be found
File Upload in Struts.
File Upload in Struts.  How to do File Upload in Struts
File Upload
File Upload  Hi I need script / string in PHP where I uploaded the file in html frontend and it should sent the uploaded file as attachment to my email address
file upload
file upload  how to recieve the uploaded file on the next jsp page for modification if its uploaded to the previous page using a from
jsp upload file to server
jsp upload file to server  How to create and upload file to server in JSP?   Find the given example that explains how to upload single and multiple file on server using JSP
upload and save the file
upload and save the file  upload and save a file from a computer to specific location of remote computer using jsp
servlet file upload
servlet file upload  please tell me the complete code to upload a file on localhost using servlet
AJAX file upload
AJAX file upload If you want to upload file asynchronously means without... Demo URL Description You need to create a form with file fields you wish to upload and define
upload a file - Framework
upload a file  Hi to All, I need to upload a file from the client and that upload file should be sent to our co., mail please if any one provide.... Thankyou in Advance.  Hi friend, For upload a file in JSP visit
Upload file to MS Access
Upload file to MS Access  Iam beginner and need to upload file to msaccess using jsp . Iam using netbeans platform. Kindly explain do I need to mention Attachment format in the table
Struts upload file - Framework
Struts upload file  Hi, I have upload a file from struts... and send to file upload to get the sheets and data in that sheets Thanks.  Hi friend, For upload a file in struts visit to : http
Upload file with ather Fieldn
Upload file with ather Fieldn  hello i want upload file with other record to database for my project,like that (FileID, Filename,Filedescrption,Filedate,file_upload) see( upload file with path) i can send data to database
file upload in spring - Spring
file upload in spring  Is it necessary to use Multipart support in spring framework for file uploads.If not please let me know the other ways to do
File Upload and Retrive files
File Upload and Retrive files  Can any body help me am getting an error in uploading file. into mysql database.... thank's in advance
Multiple File Upload in PHP
Multiple File Upload in PHP  Hi, I am beginner in PHP scripting language. I am very interested to learn PHP application. So, can anyone explain or provide related reference about how to Multiple file upload in PHP. Thanks
file upload plugin in jquery
file upload plugin in jquery  file upload plugin in jquery   You can use the following code to use the JQuery plugin. $(document).ready(function() { $("#uploadbutton").jsupload({ action: "
File upload in JSP
File upload in JSP  hi! In my previous interview i got two questions which i could not answer regarding file upload and annotations. I want to know which is the best method can be used for file upload. Whether moving them
File Upload - JSP-Servlet
File Upload  Hi everyone, I am facing file uploading problem.the multiple file upload code of roseindia is working on localhost but the same code is not working on server.i think the package commons-fileupload-1.2.jar
Java upload file to ftp
Java upload file to ftp  Hi, How to uploaded file to a ftp server in Java? Thanks   Hi, It's very easy to write a program in Java.... View complete example at FTP File Upload in Java Thanks
Multiple file upload - Struts
Multiple file upload  HI all, I m trying to upload multiple files... need to upload is dynamically generated. I have tried using formfile. and also... in solving the problem : Upload page
file upload using spring - Spring
file upload using spring  How to upload a file in server using spring framework
File upload - JSP-Servlet
File upload  I am trying to do a file upload program. But, it shows... ----------------------------------------------------------------------------- Display file upload form to the user <... the file To Upload
Ajax file upload
Ajax file upload  I am developing a application for image upload using ajax and servlet. The image should be converted in byte[] and must be saved in oracle databse as blob. After uploading the image it should be displayed
Image upload file - JSP-Servlet
:// Thanks...Image upload file  I want a code for image upload jsp or servlet
zip file upload in php - WebSevices
zip file upload in php  This is not a normal upload. we know the code for normal upload. i need the zip file upload code in php. how to upload zipfile using php? and how to unzip using php? please i dont