Mail Archives: cygwin/2004/01/15/12:24:26
> -----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.
> >
> > Ronald
> At a guess, your C: drive is a FAT (or, worse yet, FAT32)
> drive. The cygcheck output mentioned at the above link will
> show whether this is the case.
> Igor
Nope, it's more complicated than that. Here on my system I've got cygwin
root installed on an NTFS partition (under XP), and /win/t is a mountpoint
for the dos path T:\ which is a samba share from a linux box.... Now watch:
---snip---
dk AT mace /> echo helloworld >testfile
dk AT mace /> ls -la testfile
-rw-r--r-- 1 dk Domain U 11 Jan 15 17:12 testfile
dk AT mace /> echo helloworld >/win/t/testfile2
dk AT mace /> ls -la /win/t/testfile2
-rw-r--r-- 1 dk Domain U 11 Jan 15 2004 /win/t/testfile2
dk AT mace /> cp /win/t/testfile2 ./testfile2a
dk AT mace /> mv /win/t/testfile2 ./testfile2b
dk AT mace /> ls -la testfile*
-rw-r--r-- 1 dk Domain U 11 Jan 15 17:12 testfile
-rw-r--r-- 1 dk Domain U 11 Jan 15 17:12 testfile2a
-rwx------+ 1 dk Domain U 11 Jan 15 2004 testfile2b
dk AT mace />
---snip---
So, I observe that:
A) it's not to do with OP's use of dos paths with drive letters and colons
B) it's not to do with FAT-vs-NTFS
C) it's not always 000 that the perms get set to, for me it's 700
D) it happens with cp but not with mv
E) something funny seems to occur with the c/m/a timestamps as well.
Of those three, D) should give a big clue if anyone's familiar with the
different internals of those two commands...
cheers,
DaveK
--
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/
- Raw text -