CIFS symlinks on network share break Cygwin

Corinna Vinschen corinna-cygwin@cygwin.com
Wed Feb 6 12:09:00 GMT 2008


On Feb  5 20:24, Dave Korn wrote:
> On 05 February 2008 14:27, Corinna Vinschen wrote:
> > 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 $

If you run strace on chmod with smbntsec on, do you see error messages
from inside the security.cc sources (get_nt_object_security,
get_info_from_sd, etc)?  If so, I'd be interested to see them, even if
it's just out of curiosity.

>   So, can't chmod easily.  Umask appears at first glance to be respected when
> creating files:

No, don't let umask blind you ;)

What you see is what Cygwin does.  The umask is taken into account when
faking file permissions on file systems not being capable of retrieving
the data by using Windows' file security API.  You will see the same on
FAT, for instance.

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

Cool.

> [*] - not even nearly, actually, but anyway it's /one/ of those explorer shell
> extension IXxxxXxxxxx interfaces.

Sigh.  What happened to the good old, clear and simple plain C API?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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



More information about the Cygwin mailing list