X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org From: "Dave Korn" To: References: <20080204150853 DOT GD5866 AT calimero DOT vinschen DOT de> <20080204205620 DOT GA2720 AT ednor DOT casa DOT cgf DOT cx> <02fb01c86795$9aeb5080$2e08a8c0 AT CAM DOT ARTIMI DOT COM> <20080205133450 DOT GB307 AT calimero DOT vinschen DOT de> <032c01c867fd$c573da30$2e08a8c0 AT CAM DOT ARTIMI DOT COM> <20080205142712 DOT GA840 AT calimero DOT vinschen DOT de> Subject: RE: CIFS symlinks on network share break Cygwin Date: Tue, 5 Feb 2008 20:24:26 -0000 Message-ID: <03a301c86835$1a571850$2e08a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <20080205142712.GA840@calimero.vinschen.de> Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 $ 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/