delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/11/07/12:30:09

From: John DOT Wiersba AT medstat DOT com (John Wiersba)
Subject: RE: bug in cp: Permission denied
7 Nov 1998 12:30:09 -0800 :
Message-ID: <03F4742D8225D21191EF00805FE62B9993C694.cygnus.gnu-win32@mail.medstat.com>
Mime-Version: 1.0
To: "'Colman Curtin'" <colman DOT curtin AT trintech DOT com>,
"'gnu-win32 AT cygnus DOT com'"
<gnu-win32 AT cygnus DOT com>

>> What's up with this?
>>
>> touch a
>> cp -p a b
>> cp: b: Permission denied
>
> h? a or b are not Dos devices.
> does b exist already?

No.  a and b were meant to be generic file names.  I have tested this
several times in different (empty) directories in different file
systems.  In all cases, I get the same behavior, i.e. the file contents
and timestamp are copied correctly but the file access mode is not.

Here is a copy of a post I made yesterday to gnu-win32 AT cygnus DOT com which
didn't seem to make it into the mailing list (why not??):

> Can anyone reproduce this on a WinNT4 machine under b19 (or maybe
under b20)?
>
> $ touch 10101010 asdf
> $ chmod 444 asdf
> $ cp asdf fdsa1
> $ cp -p asdf fdsa2
> cp: fdsa2: Permission denied
> $ ls -l
> total 0
> -r--r--r--   1 jrw      jrwg            0 Oct 10 10:10 asdf
> -r--r--r--   1 jrw      jrwg            0 Nov  4 09:57 fdsa1
> -rw-r--r--   1 jrw      jrwg            0 Oct 10 10:10 fdsa2
>
> Note that the -p option correctly copies the timestamp, but that the
file access mode is NOT
> copied (I assume that's why there's an error message).  
>
> Why can't the file access mode be copied?
>
> I'm running b19 with coolview under WinNT, I don't know which service
pack, but the System 
> Properties shows 4.00.1381.

John Wiersba (john DOT wiersba AT medstat DOT com)
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019