From bodewig@bost.de Wed Oct 4 06:47:39 2000 Return-Path: Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 26528 invoked from network); 4 Oct 2000 06:47:39 -0000 Received: from public.ndh.net (HELO public.ndh.com) (195.94.90.21) by locus.apache.org with SMTP; 4 Oct 2000 06:47:39 -0000 Received: from sbodewig.bost.de ([195.227.98.11]) by public.ndh.com (8.9.3/8.8.0) with ESMTP id IAA07163 for ; Wed, 4 Oct 2000 08:47:38 +0200 (MET DST) Received: (from bodewig@localhost) by sbodewig.bost.de (8.9.3/8.9.3) id IAA17823; Wed, 4 Oct 2000 08:47:39 +0200 X-Authentication-Warning: sbodewig.bost.de: bodewig set sender to bodewig@bost.de using -f To: ant-user@jakarta.apache.org Subject: Re: how do you get ant's tar task to preserve execute permissions? References: <39DA56B8.45F1E384@bellatlantic.net> From: Stefan Bodewig Date: 04 Oct 2000 08:47:39 +0200 In-Reply-To: jtnews's message of "Tue, 03 Oct 2000 17:59:20 -0400" Message-ID: Lines: 21 User-Agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Capitol Reef) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N >>>>> "j" == jtnews writes: j> how do you get ant's tar task to preserve execute permissions? Basically you can't. Java doesn't have the slightest idea of file permissions (well, apart from isReadable and such) so there is no API to get or set them. If you really wanted Ant to do this, would need to exec a stat and parse its result for every file - and untar would need to exec a chmod for each file. In this particular situation I'd take one of the following two options: (1) use to invoke the OS's tar utility. (2) use after - only possible if the number of files whose permissions need to be adjusted is fixed and known. Stefan