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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=QKUzuTO2X5vSlM5a BCOjMjAR053Ncc6LPa+bZFctamhLGrev5zY3VTx+74+K1AcCpI1xr0sgywNMmnZi 2THmEpnvj9dcU8fnUzZiLzBMTIQSsROq1KZ0Pi85V5NcY1dWB0Kq4YrwzjZRgTEE vZBszR1vKJt7ibhSc9AyP02YJPQ= 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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=x2JYQI+wyfiU5mvDKmKBTd NrvJw=; b=n6yX92ZqFDqyZhxjPHPB//3jQBwHW89DKRM3yi8bXLPJgra0FzBkok BE8A8TQkRxhkGGsxDfPzcsGuJ9LYpl7BpIvi+KJV+EsA79cXVAbjP7JaQq4LOYW1 kvaXN+sf3/ZHrARbD0I+3tbC7no4oyfjChRdYyWr70kDgeVNS9Yk0= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=-0.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=herbert, unzip, rights, Administrator X-HELO: mout.gmx.net Subject: Re: wget seemingly modifies file access permissions on XP To: cygwin AT cygwin DOT com References: <56FBE524 DOT 8060309 AT mihau DOT de> From: Herbert Stocker Message-ID: <56FD637B.3040801@gmx.de> Date: Thu, 31 Mar 2016 19:50:51 +0200 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <56FBE524.8060309@mihau.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-UI-Out-Filterresults: notjunk:1;V01:K0:K8f6Ocv1bss=:bw92iX0IPhlboxHD0sQG5m ae4RH6G1An++3+vSVNbbRQncH/fvZT7GLXA2W0arvjQ6bdXX/d4D6oDLrmLaYXr1NKKzjFMZP j139847iS1xV0EKR/3LofFzaSkjRdtHGqYaSHquOWYbvbwVDUphPEkIQ8Gghwko9yCT4ru4C7 J/mNp2lrvaR8Pp+RS/10AAuZDeaiIQGmWQwyI2MULAAaLgxAy+MmjMPv1iDopL2vU/tsu+zL3 sCHLPtCk5qWcZQbBKHhxtF/Udz7mdtrE1V1yBmoeY0OlORNNowHSKND6fvBKpzHxPV6VqPMpC qP3sqlf2hsrrBDsMWvKjeXXHnYd6JvdwGcnGYSs1rwlR7OHNJMQS2WxicPy6UPSRrV1QDj9hJ 0S1KLU5IRHbJv0UTnALECBhFHiLICrDVCwqBVA13x8KKk5moO9gRMw4YN9McV/vZAX8jhiQFW OOlCNTAUy8og0T74LeADiQRZ5rnHflZ41MnGo6wzD92eBWxnUbTUJ9/42Eb58V3RCRy2rPw8w TVzOnG+Rk2+m1Zk1m8FcHy8vkawVa73hWUwZXnsW1oznAHuM1vqO2Ax7QIPSXDIiSZpIUCsBC u+I1Z/XAd6UoxzRk0kP6iwu8gKauf1JQv0YfWmg+0Q0ImNKSPunx/BSV0OvwvCvpoa/v0nVqD tpA1WiAW7S2v/eS2kFM3Ofd9drE9SrwjYF0JF91Zwp17yTXVLTaWwI3nrlMHZOaMibUh3NDJn YyGfxT92CmO+9cqTKULJmlVflcUN8g/i5egIVF4xQNc6b8/d7EzLtz/UvcglleGj1r/Lr/C/8 rA4NjC0 X-IsSubscribed: yes Hi mihau, On 30.03.2016 16:39, mihau wrote: > hello, > > (my setup is latest cygwin 32bit on Win XP SP3, logged in as > Administrator) > > I have just updated my cygwin installation after a year or so and > stumbled upon weird behavior with its wget build. it seems to > screw file access permissions on downloaded files, rendering e.g. > downloaded exe files unusable (because even the administrator > doesnt have the rights to execute them). > > this hasn't happened before today, but unfortunately I cannot tell > a. whether wget was updated today at all and if it was, b. which > version I had installed before. > And on 30.03.2016 19:55, mihau wrote: > 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. several windows batch files which I use now, either have to be > edited and "chmod +x" added in all of them - or I'll just stick with > wget mingw. i just tried wget on a Linux box, and it also does not add x flags to an .exe downloaded. What wget does is downloading a file from an HTTP server and storing it with default permissions. These seam to be 666 (rw-rw-rw-) with some of the bits removed by your umask setting. (There is no x flag in (rw-rw-rw-). We are talking about 666 or rwxrwxrwx style permissions because that's the POSIX way of expressing permissions (untless ACLs are used). And wget for Cygwin is a POSIX program and Cygwin translates the POSIX system calls from wget (which are create file, write data to file, close file, etc) to Win32 system calls that Windows can process. It tries hard to provide a perfect POSIX environment to its applications. On HTTP a file is just a bunch of bytes with a last modified time stamp and a content type. HTTP does not transfer permission bits. So if you say > it should just copy/save a file from a remote server > to a local computer, without even touching file permissions or such. then this is what wget does. It downloads the file and stores it with default permissions. i also find it a bit inconvenient to use chmod +x but that's correct behaviour for wget. And i just found out that a chmod +x is also necessary when extracting ZIP files with unzip. hth, Herbert Stocker -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple