From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 82751 invoked by alias); 31 Mar 2016 17:51:01 -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 82705 invoked by uid 89); 31 Mar 2016 17:51:01 -0000 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 Received: from mout.gmx.net (HELO mout.gmx.net) (212.227.15.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 31 Mar 2016 17:50:59 +0000 Received: from [127.0.0.1] ([46.163.75.188]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0LnOve-1a5VUf17dO-00hamy; Thu, 31 Mar 2016 19:50:55 +0200 Subject: Re: wget seemingly modifies file access permissions on XP To: cygwin@cygwin.com References: <56FBE524.8060309@mihau.de> From: Herbert Stocker Message-ID: <56FD637B.3040801@gmx.de> Date: Thu, 31 Mar 2016 17:51:00 -0000 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 X-SW-Source: 2016-03/txt/msg00583.txt.bz2 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