This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

create new file from bash: with DACL, owner, & group as windows would


I like and depend on NTSEC, but sometimes I want pure windows behavior.

How can I create a new file from the bash prompt without umask being
honored- what I want is a script to create a new empty file,
so the DACL, owner & group will be exactly what a user would
get by running the below from a simple DOS prompt:

  echo.>foo

The closest I've come from the bash prompt is:

  $ cmd /c 'echo.>foo'

The DACL is good (often purely inherited), but the owner and group
take on the sensible bash values - which I do not want.  Outside of
bash, at a simple DOS prompt, the new owner is the group administrators-
if your in that group.

I tried (for example):

  $ env -i /drv/c/WINNT/system32/cmd /c 'echo >foo'

and I get the same results - ie the owner and group still have the
bash values.

Admitted, this is a trivial problem- I can use chown to fix the owner
and group.  

Thanks as always for cygwin - I use it day in day out.

--
regards,
Tom Rodman

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]