Re: chmod of active swap file blocks

From: Neale Banks
Date: Thu Jan 01 2004 - 03:17:36 EST


On Mon, 29 Dec 2003, Paul Jakma wrote:

[...]
> > Is chmod of an in-use swapfile an important thing to be able to do?
>
> Had a box under memory pressure and had to add a swapfile to relieve
> said pressure. Noticed afterwards that it had been created under
> umask 0022 - not good, and the chmod to remove read rights for all
> blocked. Thankfully, it was my desktop, not a multiple user server :)
[...]

How much of the original problem goes away if swapon(8) were to refuse to
activate a file/device which has ownership/mode which it doesn't like?

Of course such a change to swapon(8) should be accompanied by a flag to
force swapping on a file/device with non-sane ownership/mode.

Regards,
Neale.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/