juju/utils — pull request #96 by perrito666 (2014-12-02 21:02:16+00:00)
Title: Chmod abstraction

Chmod presents a problem on windows for all its Go implementations:
When File.Chmod is used it will panic and os.Chmod will seem to
work but in reality corrupt the file permissions by trying to do the same
attribute writing that in *nixes.
This implementation uses icacls to set equivalent ACLs to the requested
permission. As discussed previously with @fwereade it covers the permissions
currently used in juju and it should be expanded for each new requirement.
Since there is no direct mapping from one permissions system to the other
a generic imlementation would be dangerous and could lead to unnoticed
wrong permissions settings.