From owner-freebsd-hackers Tue Apr 16 8: 6:48 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id 269D937B404 for ; Tue, 16 Apr 2002 08:06:44 -0700 (PDT) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 16 Apr 2002 16:06:43 +0100 (BST) Date: Tue, 16 Apr 2002 16:06:43 +0100 From: David Malone To: "PSI, Mike Smith" Cc: freebsd-hackers@freebsd.org Subject: Re: mount -u strangeness Message-ID: <20020416150643.GA97763@walton.maths.tcd.ie> References: <3CB713CB.629E4AC8@mitre.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3CB713CB.629E4AC8@mitre.org> User-Agent: Mutt/1.3.25i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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