A task like the following creates a temporary directory under build that contains read only files:
task deploy(description: 'Deploys the war', type: Sync, dependsOn:war)
fileMode = 0777
This correctly sets the fileMode of all the files in the 'out' directory, but the files placed in build/tmp/expandedArchives are all marked as read only. This task will work the first time, but subsequent calls will fail because it can't overwrite the read only tmp files. It's not clear to me why the tmp files should be left in the build directory at all - perhaps these should just be deleted on exit.
This worked correctly for us as of Milestone 8, but causes problems in the final 1.0 release.