buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Assaf Arkin" <>
Subject Re: Zip task not respecting file permissions?
Date Wed, 30 Jan 2008 01:10:19 GMT
On 1/29/08, dhpeterson <> wrote:
> Assaf Arkin wrote:
> >
> > Dave,
> >
> > Right now permissions are not copied from the file, and there's no way
> to
> > set them when including a file (i.e. :mode=>... option)  We have an open
> > issue for that:
> >
> >
> > Assaf
> >
> >
> Thanks Assaf. I don't know why I didn't see this in JIRA :)
> Rather than a ":mode => option" attribute, shouldn't the defaukt behaviour
> just be to check and respect the existing file permissions on the files?
> :mode => xxx would only be needed to override this.

That's a good question.  Tommy actually suggested this a while back, and
after thinking about it I like his idea better than the one I had before.
The one I had before was to copy the file permission from the included file.

File permissions don't preserve well when you're doing things like sharing
them through source control, so if you have a script directory like
src/main/bin, you'll need to fix the permission before including the file.
Something like running chmod on the file before including it.

At least one very common operating system ignores file permissions
altogether, so the above trick won't work.  But you can still include files
with the right permission by setting them in the zip/tar entry.

Copying the file's permission will be simpler if everyone on the project is
running a UNIX-based operating system, and files have the correct
permissions.  Otherwise, you end up with different machines generating
different (some incorrect) builds.  Picking one mode by default, and then
using an option to override it, forces you to create a buildfile that will
work the same way in every environment.


> --
> View this message in context:
> Sent from the Buildr - User mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message