summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/mount_msdos/mount_msdos.867
1 files changed, 45 insertions, 22 deletions
diff --git a/sbin/mount_msdos/mount_msdos.8 b/sbin/mount_msdos/mount_msdos.8
index ccc0d1beff0..3e7a00fc814 100644
--- a/sbin/mount_msdos/mount_msdos.8
+++ b/sbin/mount_msdos/mount_msdos.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: mount_msdos.8,v 1.24 2009/08/07 19:27:27 martynas Exp $
+.\" $OpenBSD: mount_msdos.8,v 1.25 2009/08/09 06:45:49 jmc Exp $
.\" $NetBSD: mount_msdos.8,v 1.10 1996/01/19 21:14:43 leo Exp $
.\"
.\" Copyright (c) 1993,1994 Christopher G. Demetriou
@@ -29,7 +29,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: August 7 2009 $
+.Dd $Mdocdate: August 9 2009 $
.Dt MOUNT_MSDOS 8
.Os
.Sh NAME
@@ -47,10 +47,10 @@
.Sh DESCRIPTION
The
.Nm
-command attaches the MS-DOS filesystem residing on
+command attaches the MS-DOS file system residing on
the device
.Ar special
-to the global filesystem namespace at the location
+to the global file system namespace at the location
indicated by
.Ar node .
This command is invoked by
@@ -97,7 +97,7 @@ nor
.Fl l
are given,
.Nm
-searches the root directory of the filesystem to
+searches the root directory of the file system to
be mounted for any existing Windows 95/98 long filenames.
If no such entries are found,
.Fl s
@@ -108,19 +108,9 @@ is assumed.
.It Fl m Ar mask
Specify the maximum permissions for files and directories
in the file system.
-(For example, a mask of
-.Li 755
-specifies that, by default, the owner should have
-read, write, and execute permissions, but
-others should only have read and execute permissions.
-See
-.Xr chmod 1
-for more information about octal file modes.)
Only the nine low-order bits of
.Ar mask
are used.
-The default mask is taken from the
-directory on which the file system is being mounted.
.It Fl o Ar options
Use the specified mount
.Ar options ,
@@ -136,7 +126,7 @@ nor
.Fl l
are given,
.Nm
-searches the root directory of the filesystem to
+searches the root directory of the file system to
be mounted for any existing Windows 95/98 long filenames.
If no such entries are found,
.Fl s
@@ -152,7 +142,40 @@ on which the file system is being mounted.
.It Fl x
If a directory is readable, it inherits the x attribute as well.
.El
+.Pp
+File permissions for FAT file systems are imitated,
+since the file system has no real concept of permissions.
+The default mask is taken from the
+directory on which the file system is being mounted,
+except when the
+.Fl m
+option is used.
+FAT does have a
+.Dq read only
+mode,
+in which the writable bit is unset.
+If such files are found,
+they are marked non-writable;
+it can be set using
+.Li chmod -w
+or unset using
+.Li chmod +w .
+.Pp
+File modes work the same way for directories.
+However if a directory is mounted with
+.Fl x ,
+it will inherit the executable bit if it is readable.
+This can be useful for making files non-executable
+and directories executable:
+using
+.Li -x -m 644
+will in most cases give permissions of 755 for directories
+and 644 for files.
+See
+.Xr chmod 1
+for more information about octal file modes.
.Sh SEE ALSO
+.Xr chmod 1 ,
.Xr mount 2 ,
.Xr disklabel 5 ,
.Xr fstab 5 ,
@@ -172,20 +195,20 @@ and was abandoned in favor
of the more aptly named
.Nm mount_msdos .
.Sh CAVEATS
-The maximum file size supported by the MS-DOS filesystem is
+The maximum file size supported by the MS-DOS file system is
one byte less than 4GB.
-This is a FAT filesystem limitation, documented by Microsoft
+This is a FAT file system limitation, documented by Microsoft
in Knowledge Base article 314463.
.Pp
-The MS-DOS filesystem (even with long filenames) does not support
+The MS-DOS file system (even with long filenames) does not support
filenames with trailing dots or spaces.
Any such characters will be silently removed before the directory entry
is written.
-This too is a FAT filesystem limitation.
+This too is a FAT file system limitation.
.Pp
The use of the
.Fl 9
-flag could result in damaged filesystems,
+flag could result in damaged file systems,
albeit the damage is in part taken care of by
procedures similar to the ones used in Windows 95/98.
.Pp
@@ -193,7 +216,7 @@ The default handling for
.Fl s
and
.Fl l
-will result in empty filesystems being populated
+will result in empty file systems being populated
with short filenames only.
To generate long filenames on empty DOS file systems use
.Fl l .