Mail Archives: cygwin-developers/1998/11/04/07:41:34
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 <John DOT Wiersba AT medstat DOT com> 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--------------
-- earnie_boyd AT yahoo DOT com --
-- 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
- Raw text -