delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/08/19/10:17:42

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:reply-to:subject:references:to:from:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=qNlit4G1Faj6IEiB
QpPjb4pVCtPfaakKPCOtve8PwmZ2SceFmRd2occcMdfUJrzNpuvyXvco7hQsdBYT
QDtAj7ni48trOS7Gcj306nLv7otJ67F6vdDjSb729aRvVD4/waDyViJB7yi4KdZh
rFZMOTKc03MIPYYQqpnJdehODuE=
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:reply-to:subject:references:to:from:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=gkzhvfhDhq9ky/UOlB8OYS
IQppA=; b=Cjxfwr2asjIQLL5P0kh/bKm23uD9PVfSjltjfF18mcTTrjdNqU+bDa
/feCLPsaq5aHQj5TWAPxjid3xRBshtL9syHuLLzlbFAMi4h43qKYJCPF2fks3jeH
DktgEIFqSZku5ShsCOnzjoTF2Dk+iVX3J15j8JJQCzNddbJitvU0U=
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=1.3 required=5.0 tests=BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=moss, Moss, taste, sigh
X-HELO: mailsrv.cs.umass.edu
Reply-To: moss AT cs DOT umass DOT edu
Subject: Re: Wrong file permissions
References: <CAKChYSqT9MmzkUKiob1N+ke6KJSHxzoNCmVpky1xywHvV8Aw+w AT mail DOT gmail DOT com>
To: cygwin AT cygwin DOT com
From: Eliot Moss <moss AT cs DOT umass DOT edu>
Message-ID: <ed48b580-17e6-42bc-22c8-d803d333fb23@cs.umass.edu>
Date: Fri, 19 Aug 2016 10:17:13 -0400
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0
MIME-Version: 1.0
In-Reply-To: <CAKChYSqT9MmzkUKiob1N+ke6KJSHxzoNCmVpky1xywHvV8Aw+w@mail.gmail.com>
X-IsSubscribed: yes

On 8/19/2016 8:27 AM, Björn Kautler wrote:
> Hi,
>
> I have a problem I hope you can help me to solve.
> I switched to a new box at work and copied over my whole cygwin folder via
> rsync from the old box to the new one.
> But now if I do "touch tmp", the file gets 060 permissions and not 644 like
> before.
> This is very disturbing, as not even "cat <<<foo" works but errors out with
> "bash: cannot create temp file for here-document: Permission denied".
>
> I hope you can help me with this one.

First, I suspect that Corinna, et al., will be interested in the output
of icacls applied to a file/folder in question, and possibly cygcheck
output.  Second, rsync'ing your stuff over probably does not respect
that you almost certainly have a new Windows SID on your new box.  You
probably need to change over ownership.  And any group(s) you assigned
probably did not carry over either.  Yeah, it's a pain moving to a new
box.  I suspect others on the list will have suggestions as to best
procedure to follow when moving over.

In any case, this suggests using Windows commands (manipulation from
a File Explorer opened with admin privileges) to insure that all your
files have the right owner, and (if you follow my scheme mentioned
below) to add a new group to the files (that can also be done using
a recursive chgrp once things are in a state to allow it).

For my part, I have found it helpful (or to my taste anyway) to create
a new group, distinct from my user identity.  (Windows typically kind
of conflates the two, i.e., each user *is* a group, and that group is
typically the primary group of files for which you are the primary
user / creator.)  I then chgrp all my Cygwin files to that group, and
also set folders to propagate their group to newly created files
(g+s, or 2000, permission on directories).  For my backup programs
to work I also set for all files/folders to have read access by
SYSTEM and for that to propagate from folders.  For files created by
Windows programs I still sometimes need to adjust their group manually
(sigh).

I hope this hasn't been too terse for you to get some useful guidance.

Cygwin community: Do we have guidance in the FAQ about moving a Cygwin
installation to a new box?  (I mean the user's files, not the install
done by setup -- which (IMO) should be redone on a new box, not copied.)

Regards -- Eliot Moss

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

- Raw text -


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