From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 119207 invoked by alias); 31 Mar 2016 14:01:48 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 119121 invoked by uid 89); 31 Mar 2016 14:01:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-96.6 required=5.0 tests=BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_PBL,RDNS_DYNAMIC autolearn=ham version=3.3.2 spammy=interferes, helloworld.exe, helloworldexe, UD:helloworld.exe X-HELO: calimero.vinschen.de Received: from ipbcc0d020.dynamic.kabel-deutschland.de (HELO calimero.vinschen.de) (188.192.208.32) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 31 Mar 2016 14:01:37 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 653FFA806DA; Thu, 31 Mar 2016 16:01:35 +0200 (CEST) Date: Thu, 31 Mar 2016 14:01:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: wget seemingly modifies file access permissions on XP Message-ID: <20160331140135.GA1172@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <56FBFEA3.6070205@mihau.de> <20160330164413.GA13190@calimero.vinschen.de> <56FC1309.9050907@mihau.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="bp/iNruPH9dso1Pn" Content-Disposition: inline In-Reply-To: <56FC1309.9050907@mihau.de> User-Agent: Mutt/1.5.24 (2015-08-30) X-SW-Source: 2016-03/txt/msg00573.txt.bz2 --bp/iNruPH9dso1Pn Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 2062 On Mar 30 19:55, mihau wrote: > >Btw., if you wget a file it's *supposed* to be non-executable. Assuming > >your umask is 0022, the file will be create with 0644 permissions. The > >default ACL created in this case explicitely disables execution for the > >admin user if the admin user is part of the ACL. Just run `chmod +x' > >afterwards if that's the only problem. >=20 > I specifically meant exe as in windows executables, files w/ .exe suffix; > just tried "chmod +x" and you are correct, it works, my helloworld.exe > became executable indeed. thank you for that. >=20 > any idea why wget cygwin interferes with those things though? > in my understanding it should just copy/save a file from a remote server > to a local computer, without even touching file permissions or such. That's not how it works. Consider that the file wget downloads doesn't exist yet on your side. When creating the file on your local machine, wget has to call open(2) with a set of permisssions. The set of permissions given by wget does *not* contain an execute bit. The old permission implementation in Cygwin ignored this fact for ACEs inherited from the parent directory. This, however, leads to incorrect POSIX permission bits if implemanted correctly. The recent versions of Cygwin starting with version 2.4.0 strive to implement the POSIX permission and ACL handling as correct as possible. And this in turn requires to reflect the correct execute permission setting also in the ACEs inherited from the parent dir. That's why a file downloaded with wget does not have execute permissions at all by default. wget doesn't request them, and for the ACEs inherited from the parent dir Cygwin removes the execute permissions to follow suit. Bottom line, either use rsync if possible, or when using wget try if the --preserve-permissions option fixes your problem. Alternatively, fall back to chmod +x. HTH, Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --bp/iNruPH9dso1Pn Content-Type: application/pgp-signature; name="signature.asc" Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJW/S2/AAoJEPU2Bp2uRE+gTL0P/RxJhJHDubQfNjhESs98KQjI fVwyeba1mVVNEmv3CNCaW2a76HbT+r/sGc9GBd5LrR1nXUTV1roWTwrpOLAI4BKw dYQc95tSetMgRsmz6TkHgfPJaTxP4Rz4RPemOOTNYciPMOI9iFAo1DRiY2t1oC+x +7z2FCB3MkmwWpRYt7XA/O7gBAMFymI8udZlzf6AYOaS2UJ/L5NQKsdidzM0uz/t VN3xlACTlSpK/YfgV1AtnUDeylHa5H+M4i1A1BjIzBFOXHfvrvo6JEKH+WpBsVdw MjqCjxDQwqvNtDJ0Tu5Zsou8IOp/83pu/bGriiDMG0VIuXxMj6zAd1WhKtjoYXQk bL7ojxzHUwapHLjgYj5rzJyuNzs0CF9wcbKcWkMcEGpkbLePdNv0725MbZmy7haE AgfXAU9ikvt7cZcirZpWO8VtUDd8I0AeeT0FytgUrxumUiiOohLW4ImZKXOd3TQ/ BugEAVHkJ4POUGYRRNsUuLp7P7GhnBFUnmCpRC6F/yUHbiVrcHtzC6VdSkGei7fu PzCqaquBI6S1CAsi6ZCP6tmAK3M9yo8qm1MLxYy07VwEmUh8I/+HxMhMfnLtywiC 7U+5ox31Hvd9fQvWlZVh+sSNsfA0yr1UG30PSddLKeFrGFakDeEDxgov4ZvfwQme mIT6JfdxdobI+CLpfSl8 =z6DP -----END PGP SIGNATURE----- --bp/iNruPH9dso1Pn--