Permission issues when starting CDAP SDK in restricted folders on Windows machines
Description
Release Notes
Activity

Ray Navarette May 11, 2017 at 8:23 PM
I experienced this problem on first attempted start of the 4.1.1 sdk on windows 7. I was running from an "administrator" command prompt.
A little bit of googling on the main issue "root scratch dir..." brought up a StackOverflow article with this as one of the responses: http://stackoverflow.com/a/38440368
After connecting my laptop to VPN, i was able to start without any problems. I've since disconnected and can start and stop without issue (so far). Hopefully this helps...

Gokul Gunasekaran March 29, 2017 at 1:41 AM

Ted Coyle March 10, 2017 at 9:16 PMEdited
This is either in group or local security policy. Defaults for all file permissions can be set within a policy. Win10 it is secpol I believe. Win10 home is different as those tools only exist in Win10Pro. Group policy can set the Access Control List https://technet.microsoft.com/en-us/library/cc753525(v=ws.11).aspx. - Sysinternals AccessEnum is also another good way to debug. - As of the last Win10 update I must run cdap sdk start from an elevated cmd or PowerShell prompt or the Hive access errors shows up, cdap doesn't start, and dots fill screen until ctrl-c. Only log shows cdap didn't start as cmd keeps cycling.
This seems to work for setting global defaults quickly in Win10. https://answers.microsoft.com/en-us/windows/forum/windows_7-security/how-to-reset-all-user-permissions-to-default/9da312d2-c99b-4283-a275-e74d93dcc366
https://www.microsoft.com/en-us/download/confirmation.aspx?id=23510

Poorna Chandra March 10, 2017 at 8:20 PM
We are trying to reproduce this behavior on our Windows laptop. By default everything works on our laptop. If we explicit change the permission of the directory to 666, then we can see this behavior. We now have to figure out how to get Windows to create folders with non-777 permission by default. Do you know if there is some setting or security policy in Windows that can cause new directories created not to have 777 permissions?

Ted Coyle March 10, 2017 at 1:22 PM
After latest Win10 Windows update, SDK MUST be launched via Admin privileged cmd or PowerShell prompt.
When you extract the CDAP SDK to a directory like
C:\...\cdap-sdk
on a windows machine, CDAP fails to start with the exception below:The above stack trace is for the explore tmp directory but the same problem can occur for the data/tmp directory as well. The issue does not go away even when CDAP is run as an administrative super user on Windows.
There are a couple of issues here:
1. The error says that the directory should be writable, when the permissions are rw-rw-rw. It may be that executable permissions are missing.
2. The exception message says HDFS, when CDAP is running in an SDK.