Error while executing put command with -p


i am facing this error while i run -put command with -p in it

[rkathiravan@gw01 /]$ hadoop fs -put -p /data/cards/largedeck.txt /user/rkathiravan/data
put: `/user/rkathiravan/data/largedeck.txt’: File exists
[rkathiravan@gw01 /]$ hadoop fs -put -p -f /data/cards/largedeck.txt /user/rkathiravan/data
17/02/25 22:39:57 WARN retry.RetryInvocationHandler: Exception while invoking ClientNamenodeProtocolTranslatorPB.setOwner over null. Not retrying because try once and fail.
org.apache.hadoop.ipc.RemoteException( Non-super user cannot change owner
at org.apache.hadoop.hdfs.server.namenode.FSDirAttrOp.setOwner(
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.setOwner(
at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.setOwner(
at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.setOwner(
at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(
at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$
at org.apache.hadoop.ipc.RPC$
at org.apache.hadoop.ipc.Server$Handler$
at org.apache.hadoop.ipc.Server$Handler$
at Method)
at org.apache.hadoop.ipc.Server$
at org.apache.hadoop.ipc.Client.getRpcResponse(
at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(
at com.sun.proxy.$Proxy10.setOwner(Unknown Source)
at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.setOwner(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at com.sun.proxy.$Proxy11.setOwner(Unknown Source)
at org.apache.hadoop.hdfs.DFSClient.setOwner(
at org.apache.hadoop.hdfs.DistributedFileSystem$32.doCall(

help me out!!

I see this error when the user id used to put does not have proper permissions, try with a super user or another user which has permissions and check

Exception is file already exists. and May i know what is -p argument here.??

-p Preserves access and modification times, ownership and the mode.

actually i was trying this through -put command for testing purposes. But the permissin is denied.

one doubt. can i create directory in a gateway and make use for ur testing??

typo error: one doubt. can i create directory in a gateway and make use for my testing??