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]

Re: ar 'unable to rename... Invalid cross-device link'


On Feb  7 12:21, Matthew Woehlke wrote:
> Corinna Vinschen wrote:
> >Forget getfacl.  NFS doesn't support ACLs so there's no such thing
> >as Windows security settings.  The actual relevant settings are in
> >the SFU or SUA MMC snap-in.
> 
> IOW the Unix permissions (as read by SUA)? Those're fine. In fact they 
> *do* match what getfacl is reporting except that group = 0 (wheel), 
> which apparently isn't mapping correctly.
> 
> >Actually, if you ask me, your goal is to get the native ren working.
> >If you can't get this working, you will have to ask Microsoft, IMHO.
> 
> ...and since I realized that the problem is in (newer) SUA and not 
> (older) SFU, there might be hope there. And thanks anyway. :-)

I took the time to install and configure SUA on my R2 server.  Then I
tried to rename a file, where the target file name already exists:

  $ uname -a
  CYGWIN_NT-5.2-WOW64 vmbert64 1.5.24(0.156/4/2) 2007-01-30 22:56 i686 Cygwin
  $ cd /cygdrive/h/testdir
  $ /my/secret/GetVolumeInformation-tool . | head -6
  rootdir: h:\
  Volume Name        : <>
  Serial Number      : 2065
  Max Filenamelength : 255
  Filesystemname     : <NFS>
  Flags              : 2
  $ echo foo > foo
  $ echo bar > bar

Try the native ren:

  $ cmd /c ren foo bar
  A duplicate file name exists, or the file
  cannot be found.

Well, that's ok if you ask me...
Let's try a simple rename tool:

  $ cat > rename.c << EOF
  #include <stdio.h>
  #include <string.h>
  #include <errno.h>

  int main(int argc, char **argv)
  {
    if (argc != 3)
      {
	fprintf (stderr, "usage: rename old new\n");
	return 1;
      }
    if (rename (argv[1], argv[2]))
      {
	fprintf (stderr, "rename: errne %d <%s>\n", errno, strerror (errno));
	return 2;
      }
    return 0;
  }
  EOF
  $ make rename
  cc     rename.c  -o rename
  $ ./rename foo bar
  $ cat bar
  foo
  $

So it WJFFM.  There must be a problem in your setup.


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/


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