X-Recipient: archive-cygwin@delorie.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:to:from:subject:message-id:date:mime-version
	:content-type:content-transfer-encoding; q=dns; s=default; b=sGH
	hXeFUOZDONUsvMc+KedM/FAtTr6gjLubwzNy8bmk8+4R8uluYWW1P1cOB7/nSFN8
	XsgqZIMVHreKtFqsaiCwBoCkGkD2scOAyZdB51fysOoQc8e1KYiwzDgV6Vf9a5GH
	WrLs4cbnuTVyEt7a7l7WoxWceI97kJUrUNOmi7NM=
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:to:from:subject:message-id:date:mime-version
	:content-type:content-transfer-encoding; s=default; bh=0S/CQCV3H
	IaTahg+B38i7E1EY7M=; b=evb4ZH53qitiVljklL0uLck0rQM8stdBEJC842LD2
	vSUrD+GeCMokq8VZyflmkHaQ2+zVxagwu0fXnU31WMn5xsBivLu4WJGwfUI9W+hF
	ODhrtDkVjtIpzzB2L6g8TByBGzqVPkKr7YvVQmW+AvrOMLHPVtl2w/HaFjEeT/N/
	+c=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-7.3 required=5.0 tests=BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,GIT_PATCH_2,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=H*F:D*mail.com
X-HELO: mout.gmx.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mail.com;	s=dbd5af2cbaf7; t=1545048368;	bh=Os3P5Y6dFxnPPJGnD9Oys7XptRfZTuvRt2QxdaSASXQ=;	h=X-UI-Sender-Class:To:From:Subject:Date;	b=THtxY+ljzSasHM4N+eIQXgVos11svtPewFdrX6Czv+30WdxHzSuNiQm83I0bocttE	 5wJ4WhmIuZRv0EWVSlpio4YbDvMSoHtRJxKKwMzVuHTMAncDTYvTWlLOd340jXXDqB	 A64UtiXDwM7IqEYbgW1O6FoTz5kzjgTPSajFEc1g=
X-UI-Sender-Class: 214d933f-fd2f-45c7-a636-f5d79ae31a79
To: cygwin@cygwin.com
From: john doe <johndoe65534@mail.com>
Subject: Permissions not set for 'other' when copying from Windows
Message-ID: <954f892e-786e-57e2-44d1-3d42eed28438@mail.com>
Date: Mon, 17 Dec 2018 13:06:07 +0100
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes

Hi,

I'm trying to understand why a copied file from 'C:\' into
/home/user/try doesn't have the permissions set for 'other' (see below).

The following will create a file named 'try.txt':

PS C:\> new-item try.txt -itemtype file


    Directory: C:\


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
-a---        12/17/2018  04:10 PM          0 try.txt


PS C:\>


Now copying the newly created file using the cp command on Cygwin:

user@hostname ~/try
$ cp /cygdrive/c/try.txt $PWD/


Now, the touch utility is used to create a file named 'touch.txt':

user@hostname ~/try
$ touch touch.txt

The ls command shows:

user@hostname ~/try
$ ls -l
total 0
-rw-r--r-- 1 user None 0 Dec 17 04:12 touch.txt
-rwxr-x--- 1 user None 0 Dec 17 04:12 try.txt


When the file is created with the touch utility, the permissions are
properly set for 'user', 'group', and 'other' but when the file is
copied from outsite of Cygwin only the 'user' and 'group' permissions
are set.
Obviously, 'other' is not used on Cygwin, everytime the file is SCPed on
a linux server the permissions need to be change for 'other' to match
the permissions on that server.
Why is that so and is there a better way around this?


-- 
John Doe

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

