mount -u -r drops nosuid ?
olli at lurza.secnetix.de
Mon Nov 21 09:05:46 PST 2005
Andriy Gapon <avg at icyb.net.ua> wrote:
> Not sure if this is a bug or a feature,
It's a feature, and it's documented this way.
> but it seems like potential
> security risk: I have a ufs fs mounted rw+nosuid, then I needed to
> downgrade it to ro, so I executed mount -u -r on it - imagine my surpise
> when I found that nosuid flag was removed as well.
Because you didn't specify it. When updating the options
on a filesystem, only the options that you specify are
used. Otherwise there would be no way to remove options
If you want to change only one option and keep all other
existing options, do this:
# mount -u -o current,ro /mountpoint
The special option "current" represents all options that
are currently in effect on the file system. Following
options (in this case "ro") override those.
See the mount(8) manual page for detailed information.
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.
It's trivial to make fun of Microsoft products,
but it takes a real man to make them work,
and a God to make them do anything useful.
More information about the freebsd-fs