www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/03/31/10:02:40

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=XUItAOFWj9kgwHmD06QAa9iwU3ahp1XJTFk1ZBFbLtfJVAdQk1NCr
CS6nGZkKbFmNmhCwORk2enrJOF01fbiE8vFf5b3NnnsUTKFHtsnHjjFiWYbPIGzh
tqu3ruT6jm1v4fSSJEC9z3S0i1IUT0hCQpTeja+55rFEKhd+QpVLfI=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=7yflPkK2PkLRV54lmaoGzeQVFAs=; b=da/WPGfGwVlaCdEUfpdtSuWMe9i5
jdV74bK72gLvNB8Vo63rHs3agvUqiRPw3an6CVvKUFbcCNT3VCFt6vGLXQHWpP+t
NKwCwTZfWLqcHLiwhcFrTdPL9vfZjpLu7s/+qDzIbKv4fcZ8EXW7OoOTT4UPKJGH
rmVn+Q4QHfNeHbY=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
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
Date: Thu, 31 Mar 2016 16:01:35 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: wget seemingly modifies file access permissions on XP
Message-ID: <20160331140135.GA1172@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <56FBFEA3 DOT 6070205 AT mihau DOT de> <20160330164413 DOT GA13190 AT calimero DOT vinschen DOT de> <56FC1309 DOT 9050907 AT mihau DOT de>
MIME-Version: 1.0
In-Reply-To: <56FC1309.9050907@mihau.de>
User-Agent: Mutt/1.5.24 (2015-08-30)

--bp/iNruPH9dso1Pn
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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"

-----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--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019