From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 73465 invoked by alias); 27 Apr 2018 09:27:53 -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 72977 invoked by uid 89); 27 Apr 2018 09:27:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,SPF_PASS autolearn=ham version=3.3.2 spammy=Greetings, SYSTEM, H*Ad:D*edu, gotchas X-HELO: mailsrv.cs.umass.edu Received: from mailsrv.cs.umass.edu (HELO mailsrv.cs.umass.edu) (128.119.240.136) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 27 Apr 2018 09:26:59 +0000 Received: from [129.12.41.160] (dhcp29A0.kent.ac.uk [129.12.41.160]) by mailsrv.cs.umass.edu (Postfix) with ESMTPSA id 8B6ED4023B9B; Fri, 27 Apr 2018 05:26:57 -0400 (EDT) Reply-To: moss@cs.umass.edu Subject: Re: umask problem: wrong permissions for new files To: cygwin@cygwin.com References: <20180420100357.GA21217@rus.uni-stuttgart.de> <6cd38c2e-2271-aaee-3263-babf905325c1@SystematicSw.ab.ca> <20180426143827.GA27620@rus.uni-stuttgart.de> <1823587349.20180427115440@yandex.ru> From: Eliot Moss Message-ID: <0d4824ff-5f23-1c16-a952-97bf4521aefd@cs.umass.edu> Date: Fri, 27 Apr 2018 09:27:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1823587349.20180427115440@yandex.ru> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-04/txt/msg00331.txt.bz2 On 4/27/2018 4:54 AM, Andrey Repin wrote: > Greetings, Ulli Horlacher! > >> On Fri 2018-04-20 (07:25), Brian Inglis wrote: > >>> Cygwin supports Windows ACLs as POSIX ACLs, which are also supported by >>> Linux. Use setfacl to set similar default ACLs (DACLs) on a Linux >>> directory, rerun your test there, and you should see similar results. > >> (How) can I completly remove ACLs from the cygwin files and directories? > > You CAN, yes. > However, you will lose any way to access the files, as explained below. > >> The standard UNIX permissions are sufficent for my needs and much easier >> to handle :-} > > "Standard POSIX" permissions are insufficient even for most basic operations. > They survive only because removing them would cause even more harm, than > letting them sit around. > >>> *Never* remove DACLs from any Windows directory which will *ever* be used >>> with any non-Cygwin Windows program: /undefined behaviour/ will result. > >> Uuups... thanks for the warning! Let me add this ... What mostly work for me (occasional gotchas) is this: I am "moss" and I added a group "Cygwin". I have admin permissions under Windows. A typical file acl for me has owner moss and group Cygwin - sometimes I have to set these manually, particularly if they are created by a Windows program. Also, typical acls for files print out as: # owner: moss # group: Cygwin user::rw- group::rwx #effective:rw- group:SYSTEM:r-x #effective:r-- group:Cygwin:rwx #effective:rw- mask:rw- other:r-- This corresponds to Posix permissions 664. The SYSTEM thing helps insure that Windows programs, such as my backup program, can read the file. Here is a typical directory acl: # owner: moss # group: Cygwin # flags: -s- user::rwx group::rwx group:SYSTEM:r-x group:Cygwin:rwx mask:rwx other:r-x default:user::rwx default:group::rwx default:group:SYSTEM:r-x default:group:Cygwin:rwx default:mask:rwx default:other:r-x This is more complex since it is intended to propagate useful permissions to files crated within the directory. It is the default entries that help do that. Note the -s- flag, which encodes the 2000 (set gid) bit of Posix permissions, enabling propagation of default permissions. This directory's Posix permissions are 2775. Again, the SYSTEM entries are important for me. A typical file created by a Windows program (Word, in this case) ends up with this acl: # owner: moss # group: moss # flags: -s- user::rwx group::--- group:SYSTEM:r-x group:Cygwin:rwx mask:rwx other:r-x The Posix permissions read as 2775 (rwxrwsr-x). Some people like this way of setting things up, some don't. As they say, YMMV. 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