public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Andrey Repin <anrdaemon@yandex.ru>
To: Zube <Zube@stat.colostate.edu>, cygwin@cygwin.com
Subject: Re: wget 1.17.x creates odd permissions on downloaded files
Date: Thu, 23 Jun 2016 11:32:00 -0000	[thread overview]
Message-ID: <1615080910.20160623133417@yandex.ru> (raw)
In-Reply-To: <20160622184015.GA73575@quantum.stat.colostate.edu>

Greetings, Zube!

> wget 1.16.3 seemed to work fine for a simple task, that is to download
> putty.exe from a local http site.  Start up a normal windows cmd.exe,
> download, run, no muss, no fuss.

> The last two wget versions (1.17.1-1 and -2) seem to exhibit the
> following issues when putty.exe is downloaded.

> 1) putty will not execute.  Error is "Access is denied".

That depends on the permission model you're using for directory, where you are
downloading the file to.
If you are using Cygwin ACL's, then the behavior is POSIX, and the new file
will not receive +x by default.

> 2) Examining the permissions on putty.exe, the first thing that
> comes up is an error that reads:

> "The permissions on putty.exe are incorrectly ordered, which may
> cause some entries to be ineffective."

> The permissions are odd.  When compared to a working machine (wget
> 1.16.3, cygwin 2.3.1) there is an additional group ("NULL SID") with
> special access of type Deny and several of the other users and groups
> have similar "type Deny" restrictions.

This is how Cygwin works around certain incompatibilities between Windows and
POSIX permission models.
Do NOT fall into a trap and believe that Explorer trying to drag you to.
The permissions are correct, it's just that Explorer is unable to deal with
them, because all it knows is so-called "canonical" order.

> If I use a browser to download the file or a different version of wget
> (e.g. https://eternallybored.org/misc/wget/) and drop putty.exe in
> the same directory, there are no issues.  It also doesn't matter where
> the file is dropped.  

> This occurs on both a Windows 7 64-bit machine that has had
> 32-bit cygwin upgraded multiple times and on a new Windows 10
> 64-bit machine with 32-bit cygwin installed fresh.  It occurs
> under cmd.exe and also under Cygwin.bat, for both administrators
> and non-administrators.

> Any help greatly appreciated.  Thank you for your time.

If you want Windows behavior, use noacl flag on non-Cygwin mounts.

F.e.

# RAM disk
W:/ /var/run ntfs acl,binary,nouser,posix=0 0 0
# /cygdrive mount
none /cygdrive cygdrive noacl,binary,nouser,posix=0 0 0
# Map user homes to /home
C:/Users /home bind noacl,binary,exec,posix=0 0 0
# And /tmp to user %TEMP%
none /tmp usertemp binary,user,notexec,posix=0 0 0


-- 
With best regards,
Andrey Repin
Thursday, June 23, 2016 13:21:51

Sorry for my terrible english...


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

  parent reply	other threads:[~2016-06-23 10:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-22 19:05 Zube
2016-06-22 19:36 ` Larry Hall (Cygwin)
2016-06-22 20:39   ` Zube
2016-06-22 19:43 ` Warren Young
2016-06-23 10:54   ` Andrey Repin
2016-06-23 18:20     ` Warren Young
2016-06-23 19:37       ` Andrey Repin
2016-06-24  3:23         ` Warren Young
2016-06-25 12:37           ` Andrey Repin
2016-06-23 11:32 ` Andrey Repin [this message]
2016-06-23 11:55   ` Zube
2016-06-23 13:05     ` Andrey Repin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1615080910.20160623133417@yandex.ru \
    --to=anrdaemon@yandex.ru \
    --cc=Zube@stat.colostate.edu \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).