Permissions get lost when moving files between drives.

Igor Pechtchanski pechtcha@cs.nyu.edu
Fri Jan 16 15:39:00 GMT 2004


Ronald,

There's no need to Cc: me, I read the list, hence the Reply-To.  Please
make sure your mailer respects that.

On Fri, 16 Jan 2004 FischRon<dot>external<at>infineon<dot>com wrote:

> > On Thu, 15 Jan 2004, Dave Korn wrote:
> > > > -----Original Message-----
> > > > From: cygwin-owner<at>cygwin<dot>com
> > > > [mailto:cygwin-owner<at>cygwin<dot>com] On Behalf Of Igor Pechtchanski
> > >
> > > > On Thu, 15 Jan 2004, Ronald Fischer wrote:
> > > >
> > > > > I'm using cygwin bash on a Windows 2000 machine. When I perform the
> > > > > following steps (c: is the local drive, h: is a network drive, which
> > > > > is also my $HOME):
> > > > >
> > > > > cd c:/
> > > > > echo xxx >h:/tmp/x
> > > > > mv h:/tmp/x y
> > > > >
> > > > > then a
> > > > >
> > > > >   ls -l
> > > > >
> > > > > shows that c:/y has the permissions set to 000, though h:/tmp/x has
> > > > > them correct as 644.

Umm, a bit too much snipping here.  There were another couple of lines:

> > > > Please read (and follow)
> > > > > Problem reports:       http://cygwin.com/problems.html

> > > > At a guess, your C: drive is a FAT (or, worse yet, FAT32)
> > > > drive.
>
> No, it's NTFS
>
> > > > The cygcheck output mentioned at the above link will
> > > > show whether this is the case.
>
> Which link?????

The link that was in the couple of lines you snipped (and I reinserted).
The one that's also at the bottom of (almost) every e-mail you get via
the list.  The one that says "Problem reports".

> > > C) it's not always 000 that the perms get set to, for me it's 700
> >
> > If the owner of the file on the samba share is not the same as your
> > Windows login name, the attempt to preserve file permissions might
> > result in something like that.
>
> Samba is not involved in my case

Fine, SMB is, which is essentially the same thing (don't worry, many
people get confused on this point).  If the owner of the file on the
remote computer is not the same as the one on your local machine (very
likely), you might have this problem.

> > > D) it happens with cp but not with mv
>
> You mean the other way around: Your example shows that the bug occurs with
> mv, and not with cp.
>
> > In any case, until we see the OP's cygcheck output, the applicability
> > of the above to his problem is all guesswork on both of our parts.
>
> I did a cygcheck --sysinfo ... Here are the parts of the output which
> I believe are relevant to this problem. If you need additional information,
> please let me know:

Well, the problem reporting guidelines ("the above link", or
<http://cygwin.com/problems.html>) ask that you attach the full output of
"cygcheck -svr" as an uncompressed text *attachment*, since including it
in the body of the message produces a lot of false positives on archive
searches.  We also need the full output, since the truncated one you've
sent may not show all of the relevant state on your system.

> ====
> Windows 2000 Professional Ver 5.0 Build 2195 Service Pack 4
>
> C:\cygwin\bin\id.exe output (nontsec)
> UID: 56297(fischron)  GID: 10513(mkgroup_l_d)
> 544(Administrators)   545(Users)
> 10513(mkgroup_l_d)
>
> C:\cygwin\bin\id.exe output (ntsec)
> UID: 56297(fischron)  GID: 10513(mkgroup_l_d)
> 544(Administrators)   545(Users)
> 10513(mkgroup_l_d)

So your user is a domain user...  Is the share accessible to the same
domain user on the other machine?  Are the files owned by that user?  The
output of "getfacl" on both a file on the share and a local file would
show some of this, so please post that.

> SysDir: C:\WINNT\system32
> WinDir: C:\WINNT
>
> CYGWIN = `tty ntsec'

You might want to explicitly turn on "smbntsec", too.  I know it's the
default, but just to make sure.

> HOME = `h:\'
> MAKE_MODE = `unix'
> PWD = `/cygdrive/c'
> USER = `user56297'

Hmm, interesting.  Did you modify your /etc/passwd from the output of
"mkpasswd -d"?

> Use `-r' to scan registry
>
> a:  fd           N/A    N/A
> c:  hd  NTFS   19085Mb  31% CP CS UN PA FC     MUCW0291
> d:  cd           N/A    N/A
> g:  net NTFS   1076795Mb  78% CP CS UN PA        eCRM
> h:  net NTFS    1229Mb   7% CP CS UN PA        CIFS.HOMEDIR
> m:  net MVFS    1000Mb  50% CP CS              CCase
> s:  net NTFS   104178Mb  49% CP CS UN PA FC     Drive_E
>
> C:\cygwin                          /                         user    binmode
> C:\cygwin/bin                      /usr/bin                  user    binmode
> C:\cygwin/lib                      /usr/lib                  user    binmode
> .                                  /cygdrive                 user    binmode,cygdrive
> C:\Documents and Settings          /home                     system  binmode
> C:\cygwin\usr\X11R6\lib\X11\fonts  /usr/X11R6/lib/X11/fonts  system  binmode
>
>     Cygwin DLL version info:
>         DLL version: 1.3.22

This is a very old version of the Cygwin DLL.  The latest stable version
is 1.5.5.  You should upgrade and see if you still get this problem.
IIRC, there were some changes to Cygwin's security model since the 1.3.22
release.

> Cygwin Package Information
> [snip]
> ====
>
> Ronald

Hope the above helps,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

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