| www.delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| 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 |
| Message-Id: | <200505182230.j4IMUAZY012847@tigris.pounder.sol.net> |
| To: | cygwin AT cygwin DOT com |
| From: | cygwin AT trodman DOT com (Tom Rodman) |
| Subject: | Re: create new file from bash: with DACL, owner, & group as windows would |
| In-reply-to: | <200505182118.j4ILIx7q012492@tigris.pounder.sol.net> |
| References: | <200505182013 DOT j4IKDBcF012257 AT tigris DOT pounder DOT sol DOT net> <428BA6E2 DOT 70B95230 AT dessent DOT net> <200505182118 DOT j4ILIx7q012492 AT tigris DOT pounder DOT sol DOT net> |
| Date: | Wed, 18 May 2005 17:30:09 -0500 |
| X-IsSubscribed: | yes |
On Wed 5/18/05 16:18 CDT Tom Rodman wrote:
> > $ CYGWIN=nontsec touch foo
>
> Thanks Brian, that should do it.
Here's a function I plan to use:
wtouch()
{
local file=$1
CYGWIN=nontsec touch "$file"
setacl -on "$(cygpath -aw "$file")" -ot file \
-actn setowner -ownr "n:Administrators;s:n" \
-actn setgroup -grp "n:None;s:n" \
-silent || echo $FUNCNAME:setacl failed
# see http://setacl.sourceforge.net/html/doc-reference.html
}
I'm usually an admin, hence the setacl. The advantage of
setacl over chown is that the setacl above has no impact on the
DACL.
Example:
$ wtouch foo
$ cat /tmp/mycontents > foo # leaves owner,group and DACL untouched [I think]
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |