create_android_project borked permissions on windows

create_android_project borked permissions on windows
0.0 0


From a freshly extracted cocos2d-x (latest stable), I run the create_android_project.bat after pointing the variables in the right direction. I get several permission denied errors at the end of the script (see attached image). These errors are coming from areas that the script itself is supposedly creating. Why does this happen? I tried running as root, but of course the script just told me I’m not allowed to run as root.

Borked.png (62.9 KB)


I had the same trouble. ( since version cocos2d-1.0.1-x-0.11.0 ^^ )
I change permissions on COCO2DX_DIR/HelloWorld folder to 755.
To do that, in your cygwin term.

  • change current folder to COCOS2DX_DIR.
  • run : chmod -R 755 HelloWorld

It seems that the archive file have strange permissions for this folder and create_android_project.bat copies some files from it to create the new project.

I try to change permissions with Windows Explorer but the problem still occurs.

Good luck


This problem only occurs when you put cocos2d-x on an NTFS disk…
You can simply write a shell script to change all file’s permission for those files which will be use when compiling.

chmod R 755 HelloWorld/Classes/
R 755 HelloWorld/android/
chmod -R 755 HelloWorld/Resources/

and other files which got permission denied message when compile.


Splash Huang wrote:

This problem only occurs when you put cocos2d-x on an NTFS disk…

Which is not on NTFS now ? :smiley:
Thanks for information.
Have a nice day.


Because this problem confuse me for a week and finally find out
that there is some problem in file permission between ntfs and cygwin. :smiley:

If you put cocos2d-x in a fat32 disk, then there is no problem when compiling.
(It just treat all file’s permission with rwxrwxrwx)

And I’m very suprise that the author of cocos2d-x did not get this problem when
developing / testing on win32… (maybe they use fat32 disk I think :P)


Had same problem to. Chmod things didnt fix it for me :slight_smile:

So i wrote a bat file that fix it everytime I want to run on Android.
I just save the bat and then I drag the folder of android in the bat file.
Here is the script.

@Echo Off
If [%*]==[] Echo No Folder entered&Goto:EOF
If NOT Exist "%*" Echo This folder %* does not exist&Goto:EOF
If Exist "%*\Private" (
PushD %*
For /D %%I In (*) Do (
  If /I Not "%%I"=="Private" cacls "%%I" /t /e /c /g Everyone:w&cacls "%%I" /t /e /c /g Everyone:c
  ) Else (
cacls "%*" /t /e /c /g Everyone:w
cacls "%*" /t /e /c /g Everyone:c

Hope it helps :slight_smile: Stupid solution but it works.