This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
Silly ACL problems [Was: Re: Problems with autoconf-2.52 testsuite using current CVS Cygwin]
- To: Charles Wilson <cwilson at ece dot gatech dot edu>
- Subject: Silly ACL problems [Was: Re: Problems with autoconf-2.52 testsuite using current CVS Cygwin]
- From: Charles Wilson <cwilson at ece dot gatech dot edu>
- Date: Sun, 05 Aug 2001 15:23:30 -0400
- CC: cygwin-developers at sources dot redhat dot com
- References: <996329431.27668.ezmlm@sources.redhat.com> <3B63432E.6050309@ece.gatech.edu> <3B649305.2090302@ece.gatech.edu> <3B64C0A9.1080700@ece.gatech.edu> <3B64F567.6060304@ece.gatech.edu> <3B65835C.9000001@ece.gatech.edu> <3B65A2B8.90702@ece.gatech.edu> <3B66CC47.8040704@ece.gatech.edu> <3B6711C9.6050700@ece.gatech.edu> <3B6C3A4F.3070502@ece.gatech.edu>
Well, it looks like the script below DOES cause some problems. I just
installed the new ash and binutils packages using setup. However: I
can't execute them.
Here's the ACL for /bin (prior to running setup to install the new ash)
# file: bin
# owner: 500
# group: 513
user::rwx
group::rwx
mask::rwx
other::r-x
default::mask::---
After installing ash (as Administrator), the ACL for sh.exe:
# file: sh.exe
# owner: 544
# group: 513
user::rwx
group::---
group:18:rwx
mask::---
other::---
I can fix this (by hand, after logging BACK in as Administrator), but
what went wrong?
--Chuck
Charles Wilson wrote:
> I've been using this script, lately. So far, few problems, BUT (a) it's
> specific to the problems on my system, and (b) I may be removing ACL's
> that are actually needed. I may also need to go back and add an ACL for
> group SYSTEM. I dunno. We'll see.
>
> #!/bin/sh
> # symbolic links are neither -d or -f.
> if [ -d $1 ] ; then
> setfacl -d g:544,u:500,d:g:544,d:u:500 $1
> setfacl -d g:545,u:1000,d:g:545,d:u:1000 $1
> foo=`mktemp -d /tmp/ggXXXXXX`
> if [ -d $foo ] ; then
> chmod --reference=$1 $foo
> chmod 0777 $1
> chmod 0775 $1 # force a change
> chmod --reference=$foo $1
> rmdir $foo
> fi
> else
> if [ -f $1 ] ; then
> setfacl -d g:544,u:500 $1
> setfacl -d g:545,u:1000 $1
> foo=`mktemp /tmp/ffXXXXXX`
> if [ -f $foo ] ; then
> chmod --reference=$1 $foo
> chmod 0777 $1
> chmod 0775 $1 # force a change
> chmod --reference=$foo $1
> rm -f $foo
> fi
> fi
> fi
>
> I've been calling it thus:
>
> for fn in `find . -name "*"` ; do
> echo $fn
> fixacl $fn
> done
>
> On various subtrees.
>
> --Chuck