Date: Sat, 13 Feb 2010 17:39:31 -0500 (EST) From: vogelke+unix@pobox.com (Karl Vogel) To: freebsd-questions@freebsd.org Subject: Re: setting default directory ACLs using xargs Message-ID: <20100213223932.4F268BF16@kev.msw.wpafb.af.mil> In-Reply-To: <D05FCB8B5D9E904981802903D84EEFEF3DF3@hydra.dawnsign.com> (message from Doug Sampson on Fri, 12 Feb 2010 21:08:43 -0800) References: <D05FCB8B5D9E904981802903D84EEFEF3DF3@hydra.dawnsign.com>
next in thread | previous in thread | raw e-mail | index | archive | help
>> On Fri, 12 Feb 2010 21:08:43 -0800, >> Doug Sampson <dougs@dawnsign.com> said: D> This is what led me to the workaround of: D> $ getfacl /aclTest/ | setfacl -d -b -n -M - /aclTest/ D> which actually works for me. I do dread the idea of having to manually D> apply this to all existing directories in the /data filesystem. If all else fails, abuse nawk: #!/bin/sh cd /data find . -type d -print | nawk '{printf "getfacl %s | setfacl -d -b -n -M - %s\n",$1,$1}' | sh -x exit 0 If you have spaces in your filenames, you'll either have to use perl or do something dopey like this: #!/bin/sh cd /data find . -type d -print | nawk -v sq=\' '{ printf "getfacl %s%s%s | setfacl -d -b -n -M - %s%s%s\n", sq, $0, sq, sq, $0, sq}' | sh -x exit 0 -- Karl Vogel I don't speak for the USAF or my company Yeah, yo mama dresses you funny and you need a mouse to delete files. --Markus Stumpf <maex-qmail@Space.Net>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100213223932.4F268BF16>