mount -u -r drops nosuid ?

Oliver Fromme olli at
Mon Nov 21 09:05:46 PST 2005

Andriy Gapon <avg at> 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
like nosuid.

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.

Best regards

Oliver Fromme,  secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD:
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 mailing list