This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: wget 1.17.x creates odd permissions on downloaded files
- From: Warren Young <wyml at etr-usa dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 23 Jun 2016 10:02:23 -0600
- Subject: Re: wget 1.17.x creates odd permissions on downloaded files
- Authentication-results: sourceware.org; auth=none
- References: <20160622184015 dot GA73575 at quantum dot stat dot colostate dot edu> <1C7B9046-3261-4D73-8A92-7F46B86E5A0F at etr-usa dot com> <1326055565 dot 20160623132132 at yandex dot ru>
On Jun 23, 2016, at 4:21 AM, Andrey Repin <anrdaemon@yandex.ru> wrote:
>
> Greetings, Warren Young!
>
>>> 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.â
>
>> Thatâs Explorer saying that, not Cygwin, right? Let Explorer fix it.
>
> Do NOT do that. It'll screw Cygwin permission handling.
Not necessarily.
If you can restrict Cygwin to a known set of directories, you can use Cygwin-only permissions in those directories and let Windows do whatever it wants with everything else.
Hereâs my fixperms script, which keeps both sides happy:
#!/bin/bash
if [ -z "$1" ]
then
for d in /usr/local ~/bin ~/tmp
do
echo Fixing permissions in $d...
chown -R $(id -nu) "$d"
find "$d" -exec "$0" {} \;
done
elif ! setfacl -kb "$1"
then
echo " ...in $1"
fi
Modify the list of Cygwin-only directories at the top of the script to suit your local situation.
I donât bother doing this to the entirety of c:\cygwin*. I only include directories Iâm likely to open in both Cygwin and Explorer in that list.
You might have to run it a few times to fix everything, due to the way Windows permission inheritance works. (I prefer that to the alternative, which is the breadth-first find(1) hacks: http://stackoverflow.com/q/1086907)
Youâll probably also need to run it as Administrator, at least the first time. After that, new permission changes should be ones your user has the ability to revert without Admin level privileges.
If youâve set your Cygwin HOME directory to be the same as your Windows user profile directory, be sure NOT to include ~ in the list of directories you modify with this script. There are files under %APPDATA% at the very least that will break horribly if you run this on them. Do this only on files that your user personally owns and uses, not files owned and used by Windows on your userâs behalf.
Directories you run this script on do not show the âincorrectly orderedâ symptom in Explorer.
--
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