On 05 February 2008 14:27, Corinna Vinschen wrote: > On Feb 5 13:48, Dave Korn wrote: >> On 05 February 2008 13:35, Corinna Vinschen wrote: >> >>> What exactly happens with the perms? Are you using CYGWIN=smbntsec? > > you didn't answer my first question. What exactly happens with the perms? > To what values are they set when creating a file?
Oops, pardon. I thought I had posted this yesterday but now I see it's just lying around my drafts folder. My win32 "T:" drive is a netapp share (CIFS with NFS perms) and /win/t is a mountpoint to it (system, binmode, noexec) that I use as shorthand for /cygdrive notation. /win/t/netapp $ ls -la total 0 drwxr-xr-x 1 dk Domain Users 0 Feb 4 15:23 . drwxr-xr-x 1 dk Domain Users 0 Jan 1 1970 .. /win/t/netapp $ echo $CYGWIN ntsec smbntsec notty error_start=C:\cygwin\usr\local\bin\insight.exe /win/t/netapp $ touch foo.bar /win/t/netapp $ ls -la total 0 drwxr-xr-x 1 dk Domain Users 0 Feb 4 15:23 . drwxr-xr-x 1 dk Domain Users 0 Jan 1 1970 .. -rw-r--r-- 1 dk Domain Users 0 Feb 4 15:23 foo.bar /win/t/netapp $ chmod a+rwx foo.bar /win/t/netapp $ ls -la total 0 drwxr-xr-x 1 dk Domain Users 0 Feb 4 15:23 . drwxr-xr-x 1 dk Domain Users 0 Jan 1 1970 .. -rw-r--r-- 1 dk Domain Users 0 Feb 4 15:23 foo.bar /win/t/netapp $ So, can't chmod easily. Umask appears at first glance to be respected when creating files: /win/t $ umask 0 /win/t $ touch baz.bar /win/t $ /win/t $ ls -la baz.bar -rw-r--r-- 1 dk Domain Users 0 Feb 5 15:18 baz.bar /win/t $ umask 777 /win/t $ touch baz.bot /win/t $ ls -la baz.bot ---------- 1 dk Domain Users 0 Feb 5 15:18 baz.bot /win/t $ I have no idea what happened next. Looked as if the umask was contagious: /win/t $ chmod a+rwx baz.bot /win/t $ ls -la baz.* ---------- 1 dk Domain Users 0 Feb 5 15:18 baz.bar ---------- 1 dk Domain Users 0 Feb 5 15:18 baz.bot ---------- 1 dk Domain Users 111 Aug 17 2006 baz.txt Ah, phew: /win/t $ umask 000 /win/t $ ls -la baz.* -rw-r--r-- 1 dk Domain Users 0 Feb 5 15:18 baz.bar -rw-r--r-- 1 dk Domain Users 0 Feb 5 15:18 baz.bot -rw-r--r-- 1 dk Domain Users 111 Aug 17 2006 baz.txt ...that got it back. How bizarre: a live umask with retroactive effect. /win/t $ umask 000 /win/t $ ls -la baz.* -rw-r--r-- 1 dk Domain Users 0 Feb 5 15:18 baz.bar -rw-r--r-- 1 dk Domain Users 0 Feb 5 15:18 baz.bot -rw-r--r-- 1 dk Domain Users 111 Aug 17 2006 baz.txt /win/t $ umask 077 /win/t $ ls -la baz.* -rw------- 1 dk Domain Users 0 Feb 5 15:18 baz.bar -rw------- 1 dk Domain Users 0 Feb 5 15:18 baz.bot -rw------- 1 dk Domain Users 111 Aug 17 2006 baz.txt /win/t $ umask 770 /win/t $ ls -la baz.* -------r-- 1 dk Domain Users 0 Feb 5 15:18 baz.bar -------r-- 1 dk Domain Users 0 Feb 5 15:18 baz.bot -------r-- 1 dk Domain Users 111 Aug 17 2006 baz.txt /win/t $ umask 731 /win/t $ ls -la baz.* ----r--r-- 1 dk Domain Users 0 Feb 5 15:18 baz.bar ----r--r-- 1 dk Domain Users 0 Feb 5 15:18 baz.bot ----r--r-- 1 dk Domain Users 111 Aug 17 2006 baz.txt /win/t $ umask 137 /win/t $ ls -la baz.* -rw-r----- 1 dk Domain Users 0 Feb 5 15:18 baz.bar -rw-r----- 1 dk Domain Users 0 Feb 5 15:18 baz.bot -rw-r----- 1 dk Domain Users 111 Aug 17 2006 baz.txt /win/t $ </boggle> That's just completely Tom Cruise, that is. >> (... which makes me wonder, could we possibly leverage that to do some >> useful work for us in these situations...?) > > Shure, if the DLL has a usefull documented API Heh, I believe it's IShellExtension or some such similar[*]... > and a programmer is > caring (or paid) enough to actually do it. I'd do it just so that I don't have to go to explorer all the time. cheers, DaveK [*] - not even nearly, actually, but anyway it's /one/ of those explorer shell extension IXxxxXxxxxx interfaces. -- Can't think of a witty .sigline today.... -- 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/