[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mv (fileutils) 4.1 overwrites readonly file
From: |
Vin Shelton |
Subject: |
Re: mv (fileutils) 4.1 overwrites readonly file |
Date: |
04 Aug 2001 12:29:04 -0400 |
Thanks, Jim.
- vin
Jim Meyering <address@hidden> writes:
> Thanks a lot for the report!
> That is indeed a bug: POSIX requires that mv prompt the user in that case.
> I've just fixed it for the next release.
>
> Vin Shelton <address@hidden> wrote:
> > Try the following:
> >
> > touch foo bar
> > chmod 444 foo bar
> > mv --version ==> mv (fileutils) 4.1
> > mv foo bar
> >
> > Under fileutils 4.1 this overwrites bar without any question. Under
> > older versions of fileutils (4.0p, for example), this generated a
> > query:
> >
> > touch foo bar
> > chmod 444 foo bar
> > /bin/mv --version ==> mv (GNU fileutils) 4.0p
> > /bin/mv foo bar ==> /bin/mv: overwrite `bar', overriding mode 0444?
> >
> > This is similar to a bug I reported on 4.0.40 where rm would not
> > prompt before erasing a readonly file.
> >
> > If this new behavior is intentional, is there any way to get the old
> > behavior back?