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

Re: removing a file



You, Benjamin Lorenz wrote:
> 
> > In MiNT 1.10, you can only remove a file in a directory iff:
> > 
> > (1) you have write permission to the directory,
> > (2) you own the file.
>       ^^^^^^^^^^^^^^^^
> That's right if the sticky-bit is set. Otherwise, I should be allowed 
> to remove ANY file in the directory!

True.

> The problem is: I need write permission for the file. Somebody included
> the check of the file modes in Mint 1.10.
> But that is totally bullshit! I need write permission for the 
> *directory*, and NOT for the *file* itself to be allowed to remove it. 

True again. (Though I think it's not the right place to call it
b*******. ;)

> Try this in Mint 1.10:
> % touch hello
> % chmod 400 hello
> % rm -f hello
> rm: hello: access denied

This is the correct way:

% touch hello
% chmod 400 hello
% rm hello
rm: override protection 400 for hello? y
%

> I removed these checks from the Fdelete() call and everything works
> better again! (including elm that creates it's lockfiles readonly).

Fine.

Bye,
Knarf
-- 
    Frank Bartels       |      Fax/UUCP: + 49 89 5469593          | MiNT is
knarf@nasim.sta.sub.org | Login: nuucp Index: /pub/ls-lR.nasim.gz | Now TOS!