copyToLocal: Permission denied;how to solve it?

1,268 views
Skip to first unread message

Prabakaran K

unread,
Feb 22, 2015, 9:32:24 AM2/22/15
to chenn...@googlegroups.com
Hi

While copying the output file from hdfs to local, it showing perission denied.How to solve it?

[training@localhost ~]$ hadoop fs -copyToLocal  /user/training/Aout5/part-r-00000 /home/result
copyToLocal: Permission denied

Thanks
Prabakaran Krishnan

sudhakar kurakula

unread,
Feb 22, 2015, 10:15:22 AM2/22/15
to chenn...@googlegroups.com
chmod 777 /home/result ,and then try to copy it

--
You received this message because you are subscribed to the Google Groups "Hadoop Users Group (HUG) Chennai" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chennaihug+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Prabakaran K

unread,
Feb 22, 2015, 12:14:43 PM2/22/15
to chenn...@googlegroups.com
Ok Thanks :)

Prabakaran K

unread,
Feb 23, 2015, 5:23:55 AM2/23/15
to chenn...@googlegroups.com
No chmod didnt work...

Ashwanth Kumar

unread,
Feb 23, 2015, 5:46:04 AM2/23/15
to chenn...@googlegroups.com
$ hadoop fs -copyToLocal  /user/training/Aout5/part-r-00000 /home/result

This command will copy the HDFS file as /home/result, generally /home permissions are restricted. If you're trying to copy the file to your home directory, you can instead try
$ hadoop fs -copyToLocal /user/training/Aout5/part-r-00000 ~/result

After the copy, you can view the contents as 

$ cat ~/result

HTH

Ashwanth Kumar / ashwanthkumar.in

Reply all
Reply to author
Forward
0 new messages