Subject: RE: bug in cp: Permission denied
From: [email-masked] (Earnie Boyd)

5 Nov 1998 11:11:38 -0800
Message-ID: <[email-masked]>
Reply-To: [email-masked]
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
To: John Wiersba <[email-masked]>
Cc: [email-masked],
        "gnu-win32 @cygnus.com" <[email-masked]>

I don't have any definitive answer but my assumption is that cp still
has the file "copied to" open for write when it is trying to change
the permissions to read only, or it is a timing issue with the close()
function actually getting the file closed and the chmod() function
trying to change the permissions with the chmod() function winning the
race.

---John Wiersba <[email-masked]> wrote:
>
> Thanks for your reply (the only one I've gotten).  This problem has
> nothing to do with the actual names of the files.
> 
> /junk> mount
> Device           Directory           Type        Flags
> \\.\tape1:       /dev/st1            native      text=binary
> \\.\tape0:       /dev/st0            native      text=binary
> \\.\b:           /dev/fd1            native      text=binary
> \\.\a:           /dev/fd0            native      text=binary
> C:               /                   native      text=binary
> /junk> touch 10101010 asdf
> /junk> chmod 444 asdf
> /junk> cp asdf fdsa1
> /junk> cp -p asdf fdsa2
> cp: fdsa2: Permission denied
> /junk> 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?
> 

==
-                  \\||//
-------------o0O0--Earnie--0O0o--------------
--          [email-masked]          --
-- http://www.freeyellow.com/members5/gw32 --
----------------ooo0O--O0ooo-----------------

PS: Newbie's, you should visit my page.
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".