untrusted user mount usb, followed handbook, still no luck
Roland Smith
rsmith at xs4all.nl
Mon Mar 31 16:48:37 UTC 2014
On Sun, Mar 30, 2014 at 10:39:49PM +0100, Anton Shterenlikht wrote:
> Hi
>
> I followed the handbook, sec, 18.5. USB Storage Devices:
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/usb-disks.html
>
> but still I get:
>
> $ mount_msdosfs /dev/da0s1 mnt/
> mount_msdosfs: /dev/da0s1: Operation not permitted
> $
>
> I added myself to the operator group,
> and followed all the other steps:
Perhaps a personal preference, but consider making another group, like usb.
The operator group is also used for system maintenance.
> $ id
> uid=1001(mexas) gid=0(wheel) groups=0(wheel),5(operator)
> $ tail -n2 /etc/devfs.conf
The following lines should be in /etc/devfs.rules, not /etc/devfs.conf!
> [localrules=5]
> add path 'da*' mode 0660 group operator
The rest looks OK.
> $ sysctl vfs.usermount
> vfs.usermount: 1
> $ grep devfs /etc/rc.conf
> devfs_system_ruleset="localrules"
> What am I missing?
The handbook chapter looks OK. On FreeBSD 9 or later, not unmounting the
filesystem isn't the problem it used to be. At least you don't get a kernel
panic anymore. But I would nevertheless recommend to mount USB devices with
the ‘sync’ option.
Around 2010 I wrote the manual pages devfs.conf(5) and devfs.rules(5). AFAIK
they are still up to date. If something is missing or unclear, please submit a
PR.
If you get this working, you might want to check out sysutils/automount. It
will mount partitions for you as soon as they are discovered.
Roland
--
R.F.Smith http://rsmith.home.xs4all.nl/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 5753 3324 1661 B0FE 8D93 FCED 40F6 D5DC A38A 33E0 (keyID: A38A33E0)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20140331/980c8694/attachment.sig>
More information about the freebsd-questions
mailing list