简体   繁体   中英

winutils.exe chmod command doesn't set permission

> D:\>echo %HADOOP_HOME% 
> D:\Apps\winutils\hadoop-2.7.1

Create tmp/hive folders on the same disk as HADOOP_HOME

 D:\>dir tmp\hive

  Directory of D:\tmp\hive

  06/13/2016 01:13 PM <DIR> .
  06/13/2016 01:13 PM <DIR> ..
  0 File(s) 0 bytes
  2 Dir(s) 227,525,246,976 bytes free

Try to figure out what permission are set

  D:\>winutils.exe ls \tmp\hive
  FindFileOwnerAndPermission error (1789): The trust relationship between this workstation and the primary domain failed.

When I tried chmod for this folders it seems work

 winutils.exe chmod 777 \tmp\hive 

but ls shows same exception

Does anyone has an idea what is going on ? Moreover, It works for me a couple hours ago but now my spark application fails with an exception

java.lang.RuntimeException: java.lang.RuntimeException: The root scratch dir: /tmp/hive on HDFS should be writable. Current permissions are: rw-rw-rw-
    at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:522)

I am quite late here still posting it so it might help someone in future.

  1. While setting the permission, make sure you are using correct path for winutils.exe (try to use complete path). For me winutils.exe was in C drive:

    C:\\path\\to\\winutils.exe chmod -R 777 C:\\tmp\\hive

Run the below command to check the permission and it should look like below image ([setting and checking the permission : click to see the image ]): https://i.stack.imgur.com/vE9vl.png

  1. If this is your corporate system the you must be on the same network using VPN or Forti Client or any other tool your organisation has been using

https://support.microsoft.com/en-us/kb/2771040

Looks like domain access issues, please ensure you can access domain and take a try again.

After ensure domain access, below error disappear

Caused by: java.lang.RuntimeException: The root scratch dir: /tmp/hive on HDFS should be writable. Current permissions a
re: rw-rw-rw-

I'm late here and I just encountered this issue. Writing this so it will help somebody.

If you are using your office laptop, make sure you are connected to office network and retry. The domain Member of Domain settings point to your office network. That must solve the issue.

  1. Log on Windows 10 using local Administrator account
  2. Hold Windowslogo and press E to open File Explorer 3.On the right side of the File Explorer right click on This PC and choose Properties Click Advanced System Settings
  3. Choose Computer Name tab and select change to see the value configured.

我是这里的新手,所以它可能是错误的,但我认为您需要在命令中添加 -R 如下:

winutils chmod -R 777 \tmp\hive

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM