Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Apr 2002 16:06:43 +0100
From:      David Malone <dwmalone@maths.tcd.ie>
To:        "PSI, Mike Smith" <mlsmith@mitre.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: mount -u strangeness
Message-ID:  <20020416150643.GA97763@walton.maths.tcd.ie>
In-Reply-To: <3CB713CB.629E4AC8@mitre.org>
References:  <3CB713CB.629E4AC8@mitre.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Apr 12, 2002 at 01:05:15PM -0400, PSI, Mike Smith wrote:
> It may be the correct operation, but if it isn't, having a filesystem
> change unknowingly (unintentionally) from read only to read/write could
> be a bit dangerous I would think.

"mount -u /filesys" applies the *default* set of flags to that
filesystem. Thus it turns off ro, nosuid, async, noexec, ... This
is kinda unexpected, but it would be a bad idea to change it after
this many years...

Years ago I added options "fstab" and "current" to mount. These can
be used with -u and -o to produce more expected effects, for example
if you have the line "/dev/ad0s2h /test ufs rw,nosuid 2 2" in fstab
and the filesystem has been at boot time, then the following
series of commands do:

	mount -u -o ro /test			# filesystem now ro,suid
	mount -u -o current,nosuid /test	# filesystem now ro
	mount -u -o fstab,sync			# filesystem now rw,nosuid,async

David.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020416150643.GA97763>