Hi - followed FAQ but can't mount USB key as user

2008-01-08 Thread Andy Elvey

Hi all -

I've recently installed FreeBSD 6.2-release - very impressed! 

Just a small problem. I'm unable to mount my USB key as a user.  ( I can 
mount it as root,  using the
command  mount -t msdos /dev/da0s1 /mnt   ) 


This is what I get when I try to mount it as a user -
$ mount -t msdos /dev/da0s1 /home/andy
mount_msdosfs: /dev/da0s1: Permission denied

$ mount -t msdos /dev/da0s1 /mnt
mount_msdosfs: /dev/da0s1: Operation not permitted

I followed the instructions in the FAQ ( section 9.23 ) to the letter ( 
the only change being that that doesn't mention
USB devices, so I've substituted the USB device name  da0 for the device 
names there.  )


Here are the relevant bits of information -
Release - FreeBSD 6.2-release running on a Dell OptiPlex P3 system. 


Soon after I inserted the USB key, I ran tail - here's the output -
$ tail -f /var/log/messages
Jan  8 21:37:51 localhost kernel: ad0: 8223MB Seagate ST38410A 3.03 at 
ata0-master UDMA33
Jan  8 21:37:51 localhost kernel: acd0: CDROM SAMSUNG SC-140B/d005 at 
ata1-master PIO4

Jan  8 21:37:51 localhost kernel: Trying to mount root from ufs:/dev/ad0s1a
Jan  8 21:40:02 localhost kernel: uhub1: Prolific Technology Inc. USB 
Embedded Hub, class 9/0, rev 2.00/1.00, addr 2
Jan  8 21:40:02 localhost kernel: uhub1: 1 port with 0 removable, self 
powered
Jan  8 21:40:03 localhost kernel: umass0: Prolific Technology Inc. USB 
Mass Storage Device, rev 2.00/1.00, addr 3

Jan  8 21:40:03 localhost kernel: da0 at umass-sim0 bus 0 target 0 lun 0
Jan  8 21:40:03 localhost kernel: da0: USB 2.0 Flash Disk 1.00 
Removable Direct Access SCSI-0 device

Jan  8 21:40:03 localhost kernel: da0: 1.000MB/s transfers
Jan  8 21:40:03 localhost kernel: da0: 992MB (2031616 512 byte sectors: 
64H 32S/T 992C)



$ usbdevs
addr 1: UHCI root hub, Intel
addr 2: USB Embedded Hub, Prolific Technology Inc.
 addr 3: USB Mass Storage Device, Prolific Technology Inc.

$ cat /etc/fstab
# DeviceMountpoint  FStype  Options Dump
Pass#
/dev/ad0s1b noneswap  
sw   0   0
/dev/ad0s1a / ufs
rw   1   1
/dev/ad0s1d /home  ufs
rw   2   2
/dev/acd0/cdrom  cd9660  ro,noauto
0   0 

(  Just before posting here, I was about to add a usb entry to the 
fstab, but then I thought No -
it wasn't needed for root to mount the device, and adding that to the 
fstab wasn't mentioned in

the FAQ  that I was carefully following..)

$ groups andy
andy wheel operator

$ cat /etc/rc.conf 
(  removed my IP address details for the purposes of posting here )

linux_enable=YES
moused_enable=YES
usbd_enable=YES

So, I'm a bit puzzled as to what I might have missed.   I've now even 
rebooted a couple of times, but
nothing has changed. I can mount the device as root but not as a user.  
So, any suggestions are very
welcome...  Thanks very much for your time  :-) 
-  Andy



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Hi - followed FAQ but can't mount USB key as user

2008-01-08 Thread Andy Elvey

[EMAIL PROTECTED] wrote:

Andy,

On Jan 8, 2008 9:48 AM, Andy Elvey [EMAIL PROTECTED] wrote:
  

Hi all -

 I've recently installed FreeBSD 6.2-release - very impressed!

Just a small problem. I'm unable to mount my USB key as a user.  ( I can
mount it as root,  using the
command  mount -t msdos /dev/da0s1 /mnt   )

This is what I get when I try to mount it as a user -
$ mount -t msdos /dev/da0s1 /home/andy
mount_msdosfs: /dev/da0s1: Permission denied

$ mount -t msdos /dev/da0s1 /mnt
mount_msdosfs: /dev/da0s1: Operation not permitted

I followed the instructions in the FAQ ( section 9.23 ) to the letter (
the only change being that that doesn't mention
USB devices, so I've substituted the USB device name  da0 for the device
names there.  )



hmmm, freebsd.org seems to be broken for me

- man devfs.rules

- create /etc/devfs.rules: ( substitute wheel for the group you want )

[localrules=10]
add path 'da*s*' mode 0660 group wheel

- append to /etc/rc.conf:

devfs_system_ruleset=localrules

- make sure the dir you are mounting on is owned by the user who
issues the mount command.

- make sure vfs.usermount=1

- reboot after changing devfs.rules  rc.conf

worked for me, let us know if it worked for you.

regards,

usleep
  

 Hi usleep - many thanks for this!   I'll let you know soon :-)
 Bye for now -
- Andy




___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Success! ( was - can't mount USB key as user )

2008-01-08 Thread Andy Elvey

[EMAIL PROTECTED] wrote:

hmmm, freebsd.org seems to be broken for me

- man devfs.rules

- create /etc/devfs.rules: ( substitute wheel for the group you want )

[localrules=10]
add path 'da*s*' mode 0660 group wheel

- append to /etc/rc.conf:

devfs_system_ruleset=localrules

- make sure the dir you are mounting on is owned by the user who
issues the mount command.

- make sure vfs.usermount=1

- reboot after changing devfs.rules  rc.conf

worked for me, let us know if it worked for you.

regards,

usleep
  
 Hi again - 
 Success!   I can now mount USB devices as a user - thanks very much 
for your help usleep! 

One of the things that helped (as it usually does ;)   )  was having a 
careful re-read of the docs for USB devices.  When I did that, I found 
that for some silly reason, instead of having
'da*'   in my /etc/devfs.rules file, I had 'da*s*'  .( Argh. 
applies face firmly to keyboard. ).   Anyway, that now works perfectly.


I have more good news.  The above stuff was for my USB key.  I also have 
an external USB hard-drive (with the Linux ext2 filesystem on it).  When 
I tried that, at first it didn't work (not surprisingly).  A quick 
search on the net gave me a page that mentioned kldload'  (which I've 
never heard of - anyway, as I thought, it loads modules into the kernel). 

The example given was for reiserfs, but I tried (as su)  kldload 
ext2fs  and then (as normal user)  mount -t ext2fs /dev/da0s1  
/mnt/andy  and it worked!  

Ahh... now I can get into the thing I've really been looking forward to 
-  pf  :-)  .   That should probably have me being nervous, but it 
doesn't.   I've already done a lot of reading-up on it -
it sounds great, and you've got to have a heap of respect for the guy 
who wrote it.I've already found out about pftop and so on, so that 
should come in handy

Bye for now -
- Andy



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]