Why do I get a Windows file permission error (IO Error 13) with Android SDK when writing to files starting with a dot?

StackOverflow https://stackoverflow.com/questions/2118606

Question

Running Titanium Appcelerator 0.8.1 on a Windows XP Virtual Machine, with Android SDK 2.1

When running build/install app, getting the following error (last line broken for display here):

[TRACE] f = open(os.path.join(dest, dest_file), "w")
[TRACE] IOError: [Errno 13] Permission denied:
  'C:\\Documents and Settings\\firstname.surname\\Desktop\\MyApp\\build\\android\\.classpath'

Removing .classpath results in .classpath being created, but the error simply moves onto the next file it has to write to.

The files are in a git repository, checked out via msysgit, but the same error occurs when the files are copied directly from the git server to the Windows machine. Unfortunately the Titanium dev app won't rebuild the Android package for an existing app if the build\android files are missing, so it's not possible just to not check these into git.

The files appear to have the correct permissions - are writable by the current user account, don't have the read-only flag set (checked via 'attrib'), and have set the access options and owner via the Security/Advanced dialogues on the files and directories (and checked by a Windows IT admin here)

As far as I can tell, nothing else has the file open (a possible cause of IOError 13).

What could be the reason here? Could Git be the culprit?

Was it helpful?

Solution

Answering my own question in case anyone else gets the same issue:

  • removing the hidden flag (with attrib -H) fixes the file permission problem.

(the Hidden flag was set by msysgit, to match the 'hidden' nature of dotfiles in Unix)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top