www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/06/09/13:43:02

Date: Sat, 09 Jun 2001 20:41:32 +0300
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: tim DOT van DOT holder AT pandora DOT be
Message-Id: <4331-Sat09Jun2001204131+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: <CAEGKOHJKAAFPKOCLHDIIEACCEAA.tim.van.holder@pandora.be>
Subject: Re: .files on servers are perceived as readonly
References: <CAEGKOHJKAAFPKOCLHDIIEACCEAA DOT tim DOT van DOT holder AT pandora DOT be>
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: "Tim Van Holder" <tim DOT van DOT holder AT pandora DOT be>
> Date: Sat, 9 Jun 2001 18:58:50 +0200
> 
> > > > Could you please explain what exactly is wrong with that?  Why did it
> > > > annoy you that .cvsignore was shown as not writable?
> > > Because it's a writable file.
> > 
> > Not really:
> > 
> >     D:\usr\djgpp\data>touch foobarh
> > 
> >     D:\usr\djgpp\data>attrib +H foobarh
> > 
> >     D:\usr\djgpp\data>del foobarh
> >     File not found
> 
> The key point here is that's it ENOFILE, and not EACCESS that is reported.

Yes, I know.  But it is impossible to drag this effect into the Posix
world.  Resetting the write bit was a compromise.

> So I'd expect the same behaviour as on DOS: hidden files should not be
> seen in directory walks by default (as is the case now), and destructive
> commands such as rm should by default pretend not to find them.

Unfortunately, I don't know how to do that without breaking lots of
programs.  The original version of readdir was coded by DJ to skip
hidden files, but that proved to be a pest: literally every ported
program needed to work around that by setting the DJGPP-specific flag
that forced hidden files to be returned as well.  For example, if
readdir doesn't return hidden files, you cannot remove directories
with such files with "rm -r".

So we changed that in v2.02 to not skip hidden files by default.

> Perhaps for hidden files, you could mask out the group & others bits (i.e.
> return 0600 instead of 0666).

This will not do what you want: as long as the user has write access
to the file, many programs won't do anything special with it.  For
example, `rm' won't ask you whether to remove it.

- Raw text -


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