From owner-freebsd-questions@FreeBSD.ORG Mon Mar 31 16:48:37 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F4EA29C for ; Mon, 31 Mar 2014 16:48:37 +0000 (UTC) Received: from smtp-vbr14.xs4all.nl (smtp-vbr14.xs4all.nl [194.109.24.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 366A7902 for ; Mon, 31 Mar 2014 16:48:36 +0000 (UTC) Received: from slackbox.erewhon.home (slackbox.xs4all.nl [83.162.243.5]) by smtp-vbr14.xs4all.nl (8.13.8/8.13.8) with ESMTP id s2VGmW3d085826; Mon, 31 Mar 2014 18:48:32 +0200 (CEST) (envelope-from rsmith@xs4all.nl) Received: by slackbox.erewhon.home (Postfix, from userid 1001) id 92EC71231A; Mon, 31 Mar 2014 18:48:32 +0200 (CEST) Date: Mon, 31 Mar 2014 18:48:32 +0200 From: Roland Smith To: Anton Shterenlikht Subject: Re: untrusted user mount usb, followed handbook, still no luck Message-ID: <20140331164832.GA28635@slackbox.erewhon.home> Mail-Followup-To: Anton Shterenlikht , freebsd-questions@freebsd.org References: <201403302139.s2ULdnMG023524@mech-cluster241.men.bris.ac.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qMm9M+Fa2AknHoGS" Content-Disposition: inline In-Reply-To: <201403302139.s2ULdnMG023524@mech-cluster241.men.bris.ac.uk> X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.23 (2014-03-12) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Mar 2014 16:48:37 -0000 --qMm9M+Fa2AknHoGS Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Mar 30, 2014 at 10:39:49PM +0100, Anton Shterenlikht wrote: > Hi >=20 > I followed the handbook, sec, 18.5. USB Storage Devices: > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/usb-disks.html >=20 > but still I get: >=20 > $ mount_msdosfs /dev/da0s1 mnt/ > mount_msdosfs: /dev/da0s1: Operation not permitted > $=20 >=20 > 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=3D1001(mexas) gid=3D0(wheel) groups=3D0(wheel),5(operator) > $ tail -n2 /etc/devfs.conf The following lines should be in /etc/devfs.rules, not /etc/devfs.conf! > [localrules=3D5] > 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=3D"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 =E2=80=98sync=E2=80=99 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 submi= t 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 --=20 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) --qMm9M+Fa2AknHoGS Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJTOZxgAAoJEED21dyjijPgllMQAJxcqIjwmrHoSFBBtRodaU0v OAQ2H7r9bhJUmnEs6llVxVvj9/fRzzRuWlQ/Mr1zeCk24hclNmZl9HYe0KKh5Esa CtAL7EyhsAKj7ikEl7vCRgRqwFP87kn4On3N+oldgfTCOtRbsrVljjKmCI4mLxQ/ uVTudK6AavIJJ598Ma9zZmCyuEKmgJ4rOGzZr3la+me5vp7IjD3VZTXs/tKZZIL0 /sdTn3k9GQHa/73SlAjCzj6q3t4uTQaNOVKzptokOFgO9asHnqo2Z5c/QAfGZLtB P3YM95Mnj5u+re4iUV5eG5PryVvGSB4NxQ8y3GkoeembImPdCU+8Qm8VU0FU80OS vDSm/amj1ewi80kXR6sIPfEMUXZMaIUuYy1paSmt+FpaWmGoaDdGu90gpVYX8boU oPvYzGz+dGE4b7BevfgWx+HaiUTgKgP+4ugbBOI3DhQIfLUsey/fnVoQxIicEKmF 918GamgVgdxOGW1GJn2/w+2pfluMkm5Tgjhu+yerPViYwehizazJm6iegz0Ynceh I/z2aYZ9j9LL1c7rwuFWdH/W3uAA60Fhsls3GJvZiwBfeWcpBkKLYXE991x1oLyj YPxCy1HagOolQfeWZpvCEHn4bgsJJrLgo1VzTYL5zAV3qvIalMLr3AtKnN39Ka59 uJp65N8itmIlb3EDr5G0 =0sR0 -----END PGP SIGNATURE----- --qMm9M+Fa2AknHoGS--