This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Make a hole (i.e. a posix-only tree for Cygwin)
- From: "Houder" <houder at xs4all dot nl>
- To: cygwin at cygwin dot com
- Date: Wed, 11 Feb 2015 11:59:15 +0100
- Subject: Make a hole (i.e. a posix-only tree for Cygwin)
- Authentication-results: sourceware.org; auth=none
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