delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/06/09/13:25:28

Date: Sat, 09 Jun 2001 20:24:32 +0300
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: Martin Str|mberg <ams AT ludd DOT luth DOT se>
Message-Id: <3791-Sat09Jun2001202431+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9
CC: djgpp-workers AT delorie DOT com
In-reply-to: <200106091647.SAA03549@mother.ludd.luth.se> (message from Martin
Str|mberg on Sat, 9 Jun 2001 18:47:27 +0200 (MEST))
Subject: Re: .files on servers are perceived as readonly
References: <200106091647 DOT SAA03549 AT mother DOT ludd DOT luth DOT se>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: Martin Str|mberg <ams AT ludd DOT luth DOT se>
> Date: Sat, 9 Jun 2001 18:47:27 +0200 (MEST)
> 
> According to Eli Zaretskii:
> > > Because there's a readonly attribute. If you want a file readonly you
> > > set this attribute not the SYSTEM or HIDDEN bits.
> > 
> > So you are saying that a file with a HIDDEN or SYSTEM attribute set
> 
> Those usually do have the readonly bit set too

Not always.  Look in the C:\windows directory on any Windows system,
and you will see quite a few files and directories that are hidden or
system, but not readonly.

> > should look to a user of "ls -l" as a normal file?  How would that
> > user then guess the reason for the strange behavior she observes when
> > DOS commands and functions are invoked on those files?
> 
> Well, if he uses DOZE commands he's not using ls...

We are not talking about `ls' alone, we are talking about `stat'.
"ls -l" doesn't do anything special with these attribute bits, it
simply shows the mode bits returned by `stat'.

The issue is how, if at all, should `stat' tell its caller that some
files have hidden/system attribute bits set.

> > Could you please explain what exactly is wrong with that?  Why did it
> > annoy you that .cvsignore was shown as not writable?
> 
> 1. As I said, it's a lie. The readonly bit isn't set so the file isn't
> readonly.

I agree that the mapping isn't ideal.  I just don't see a better
mapping, and ignoring those bits surely doesn't seem a good
alternative.

> 2. Why it annoys me immensly is that I routinely do "cp -a
> v:/my/cvs/tree/of/djgpp/src/* /djgpp/src.compiling/" while
> developing. And now I get a ton of warnings from cp because the copy
> made the previous run of cp is set to readonly.

When you copy directory trees, you should use "cp -rf".  Otherwise,
every write-protected file will trigger a prompt.

- Raw text -


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