Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 07 Jun 2007 08:02:28 -0500
From:      Reid Linnemann <lreid@cs.okstate.edu>
To:        ajm <ajm91qw@sbcglobal.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: How to mount USB key
Message-ID:  <466801E4.50407@cs.okstate.edu>
In-Reply-To: <20070607015609.GC749@powerfull.bsd>
References:  <716841580706060957o4cae2a93lc24ef11c29c06af9@mail.gmail.com>	<200706061321.57016.mike.jeays@rogers.com> <20070607015609.GC749@powerfull.bsd>

next in thread | previous in thread | raw e-mail | index | archive | help
Written by ajm on 06/06/07 20:56>>
> On Wed, Jun 06, 2007 at 01:21:56PM -0400, Mike Jeays wrote:
>> On Wednesday 06 June 2007 12:57, Oscar Chavarria wrote:
>>> I want to copy files to it. I introduced the key and was recognized as da0.
>>>
>>> I did ls dev/da0 ==> dev/da0
>>>
>>> Then
>>>
>>> mount /dev/da0 /home ==> incorrect super block.
>>>
>>> Thank you in advance for any help.
>> If it is a DOS-format device, you need to say
>> mount -t mdsos /dev/da0 /mnt
>> or maybe
>> mount -t msdos /dev/da0s1 /mnt
>>
>>
> 
> In my /etc/sysctl.conf file I have the following:
> 
> -------------------
> # user mounts devices
> vfs.usermount=1
> -------------------
> 
> In my /usr/local/etc/sudoers file I have the following:
> 
> -------------------
> # Defaults specification
> Defaults env_reset
> Defaults timestamp_timeout=0
> Defaults tty_tickets
> Defaults requiretty
> Defaults passwd_timeout=1
> 
> # User privilege specification
> alex  ALL=/sbin/umount,\
>         /sbin/mount_msdosfs
> -------------------
> 
> I have added user alex to the wheel group
> 
> To mount the device as regular user (alex), I created a sub-directory in
> my home directory.  
> 
> In this example, my home directory is   alex    and the 
> sub-directory is     mnt_drive
> 
> Execute the following to mount the drive...considering that /dev/da0 is 
> the drive to mount.
> 
> sudo mount_msdosfs /dev/da0 /usr/home/alex/mnt_drive
> 
> Execute the following to un-mount the drive
> 
> sudo umount /usr/home/alex/mnt_drive
> 
> Hope it helps...
> 

Just a side note, as so many users do not realize this when doing 
non-root mounts... the non-root user _must_ own the mountpoint. It 
doesn't matter if you've "chmod 0777"ed it or not, if your user does not 
own the mountpoint you will not be able to perform the user mount.



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