delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/02/11/06:03:54

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:message-id:date:subject:from:to:mime-version
:content-type:content-transfer-encoding; q=dns; s=default; b=RA7
dA1p4e5iiHX1g/OVGdnaWuQRH8Dd6hssu8SyuLw3uwReUa7f+6bPl3Jcx3T4nNK/
WV2sPhKCOVqMTEbNTORtHm9GYz4LeKGdEcVF1damnLV2a6s4Il3lU3NnKOuugYi9
KYG7tqiz+GKF3jMnFsE2rYAxPhDm9b30AdKNNKnI=
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:message-id:date:subject:from:to:mime-version
:content-type:content-transfer-encoding; s=default; bh=h1/zugKN+
AQODJDJDc7VkD2D7E4=; b=h3UiyWAjN+lMGd6xt2fFV2mWY0Ew1e7hr5s5A+SfW
1VjoeImO1yj18KzCScofew7lkIj2ctVZ8g8ltPauvwR94DPgkyEh+p8vOfBFMR2j
RAc6e8mVWGyMlfGF5AeJk6HrSW5VL6+Z62arayScaJjfzryc7Yusc+CgiP+T7Pa9
6E=
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=0.0 required=5.0 tests=AWL,BAYES_20,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2
X-HELO: lb3-smtp-cloud2.xs4all.net
Message-ID: <b91401ee210b2233c921998f193b471f.squirrel@webmail.xs4all.nl>
Date: Wed, 11 Feb 2015 11:59:15 +0100
Subject: Make a hole (i.e. a posix-only tree for Cygwin)
From: "Houder" <houder AT xs4all DOT nl>
To: cygwin AT cygwin DOT com
User-Agent: SquirrelMail/1.4.18
MIME-Version: 1.0

Achim Gratz wrote here:

    https://cygwin.com/ml/cygwin/2015-02/msg00235.html
    (Re: group permissions)

> Again, if you want POSIX-only directory trees, remove all inheritable
> ACL from the top of the tree before populating it:
>
> $ cd tree
> $ setfacl -b .

Exactly.

For those 'new to Cygwin' the following may be worth reading: # pay attention to the bottom of this text.

@@ pwd # top of a drive/partition (here d:)
/drv/d

@@ getfacl Test # directory d:Test has been created using WINDOWS EXPLORER !!!!!
# file: Test
# owner: Henri
# group: None
user::---
group::---
group:SYSTEM:rwx
group:Administrators:rwx
group:Users:r-x
mask:rwx
other:---
default:user::---
default:group::---
default:group:SYSTEM:rwx
default:group:Administrators:rwx
default:group:Users:r-x
default:mask:rwx
default:other:---

@@ setfacl -b Test # NON-elevated bash here
setfacl: Permission denied # <==== that is pity

@@# setfacl -b Test # elevated bash here
@@# getfacl Test
# file: Test
# owner: Henri
# group: None
user::---
group::---
other:---
default:user::---
default:group::---
default:other:---

@@# ## I am missing something, dont I?

@@# setfacl -m u::rwx,g::r-x,o:r-x,d:u::rwx,d:g::r-x,d:o:r-x Test
@@# getfacl Test
# file: Test
# owner: Henri
# group: None
user::rwx
group::r-x
other:r-x
default:user::rwx
default:group::r-x
default:other:r-x

-----
Now using ONLY the Windows Explorer to arrive at the same result: -- i.e. without using Cygwin (e.g. not
installed yet)

 (right-click) properties > security > ADVANCED
   - change permissions
   - add creator owner, _full_control_, this folder ... (i.e. the whole tree)       apply
   - add creator group, read & execute, this folder ... (i.e. the whole tree)       apply
     (i.e. traverse folder/execute file, list folder/read data, read attributes, read extended attributes,
      read permission)
   - add everyone,      read & execute, this folder ... (i.e. the whole tree)       apply
     (ditto)
   - uncheck 'include inheritable permissions ...' # i.e. break inheritance
      - remove inherited parent permissions                                         apply

The output of 'getfacl Test' will be the same as above ...

Now install Cygwin and you wont have to fight file permission further down the road ...

Henri


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