[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Deleting owned files...



itschere@TechFak.Uni-Bielefeld.DE writes:

|>  Hellooo...
|>> |> lancelot# ll !$
|>> |> -r--r--r--   1 269      15          17976 May 11 19:46 uucp-1.03/COPYING
|>> |> lancelot# tar xzvf uucp-1.03.tar.gz uucp-1.03/COPYING
|>> |> uucp-1.03/COPYING
|>> |> tar: Could not create file uucp-1.03/COPYING : access denied.
|>> 
|>> MiNT does not allow root to open a readonly file for writing.  This
|>> should really be changed, IMHO.

|>  Hmmm, wrong. MiNT (or the denyaccess() routine) does very well allow root
|> to open a readonly file for writing. 

Yes, i stand corrected. I was confusing it with the inability to
*delete* a readonly file, even if the directory has write permission.
On tosfs, this may be The Right Thing, but it should not be enforced
by MiNT, since the minix fs has real directory permissions.

Under SunOS you get the same error when tar tries to extract readonly
file which exists already.

|> The problem is that you must ignore the
|> reported filemode and just try it. Most programs seems to self-check the
|> file modes before trying to open the file, and therefore fail. I've seen
|> some GNU tools and editors doing this.

Most tool just open a file with fopen or open, and make no explicit
check for access permission, rather they rely on the OS for doing
this.  GNU emacs does check for write access, and if the user confirms
that she really wants to write to the file, it changes the file modes
temporarily.

Andreas.

-- 
+------------------------------------------------------------------------+
Andreas Schwab                                      "And now for something
schwab@ls5.informatik.uni-dortmund.de                completely different"
* Linux/Atari is coming real soon now, stay tuned *