Permission Denied - \\tmp\\hive in sparklyr

2019-07-05 12:58发布

问题:

I am trying to copy R dataframe to Spark 2.0.1 using copy_to function but it says

The root scratch dir: /tmp/hive on HDFS should be writable. Current permissions are: rw-rw-rw-

I executed winutils.exe to change the permissions but still I get the same Exception of permissions.

%HADOOP_HOME%\bin\winutils.exe chmod 777 \tmp\hive

I tried other variants of the command like -

%HADOOP_HOME%\bin\winutils.exe chmod 777 C:\tmp\hive
%HADOOP_HOME%\bin\winutils.exe chmod 777 /tmp/hive
%HADOOP_HOME%\bin\winutils.exe chmod 777 -R \tmp\hive

but nothing worked. I still get the error

回答1:

I tried using advanced permission and all my permissions were set to rwx. I tried running ls -l command but was getting an error;

C:/> %HADOOP_HOME%/bin/winutils ls C:/tmp/hive
FindFileOwnerAndPermission error (1789): The trust relationship between this workstation and the primary domain failed.

My system was unable to connect to it's domain controller so I had to connect to VPN and then execute C:/> %HADOOP_HOME%/bin/winutils chmod 777 /tmp/hive.

It worked!