From owner-freebsd-stable@FreeBSD.ORG Wed Feb 8 18:36:42 2006 Return-Path: X-Original-To: freebsd-stable@FreeBSD.ORG Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1098416A420 for ; Wed, 8 Feb 2006 18:36:42 +0000 (GMT) (envelope-from martinkov@pobox.sk) Received: from smtp.dkm.cz (smtp.dkm.cz [62.24.64.34]) by mx1.FreeBSD.org (Postfix) with SMTP id 4B7E443D72 for ; Wed, 8 Feb 2006 18:36:39 +0000 (GMT) (envelope-from martinkov@pobox.sk) Received: (qmail 3653 invoked by uid 0); 8 Feb 2006 18:36:37 -0000 Received: from r5k4.chello.upc.cz (HELO ?86.49.10.4?) (86.49.10.4) by smtp.dkm.cz with SMTP; 8 Feb 2006 18:36:37 -0000 Message-ID: <43EA3A34.8070801@pobox.sk> Date: Wed, 08 Feb 2006 19:36:36 +0100 From: martinko User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20051205 X-Accept-Language: sk, cs, en-gb, en-us, en MIME-Version: 1.0 To: freebsd-stable@FreeBSD.ORG References: <20060208064637.11c015ee.lists@elehack.net> <200602081327.k18DRCY2061980@lurza.secnetix.de> In-Reply-To: <200602081327.k18DRCY2061980@lurza.secnetix.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: olli@lurza.secnetix.de Subject: Re: Trouble with mounting USB stick as user X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Feb 2006 18:36:42 -0000 Oliver Fromme wrote: > Michael Ekstrand wrote: > > Rob wrote: > > > Can anyone shed some light on what is happening here? > > > > AFAIK, only root can mount things under FreeBSD, period. I could be > > wrong on this... > > You are wrong. :-) > > > but I looked around a while ago for something to do > > the job of the Linux 'user' option, and found nothing. I kinda remember > > trying changing permissions too. > > > > If I'm wrong, I'd love to be corrected :-). > > You're welcome. :-) > > To enable user mounts, there are three conditions: > 1. sysctl vfs.usermount=1 > 2. The user must have read+write permission on the device > which is to be mounted. This is usually accomplished > by creating a special group for this device. > 3. The user must _own_ the mountpoint (r/w permission is > not sufficient). > > Of course, an alternative is to use sudo (ports/security/sudo) > or super (ports/security/super, which prefer). > > Best regards > Oliver > hello, i must be missing something (and i'm quite convinced that it worked when i set it up initially) ... [mb-aw1n-bsd][mato][~] $ id uid=1001(mato) gid=1001(mato) groups=1001(mato), 0(wheel), 5(operator) [mb-aw1n-bsd][mato][~] $ sysctl vfs.usermount vfs.usermount: 1 [mb-aw1n-bsd][mato][~] $ ll mnt/ total 10 drwxr-x--- 2 mato mato 512 Dec 11 20:44 cdrom drwxr-x--- 2 mato mato 512 Dec 11 20:44 dos drwxr-x--- 2 mato mato 512 Dec 11 20:44 fat drwxr-x--- 2 mato mato 512 Dec 11 20:44 lin drwxr-x--- 2 mato mato 512 Dec 11 20:44 win [mb-aw1n-bsd][mato][~] $ grep "/mato" /etc/fstab /dev/acd0 /usr/home/mato/mnt/cdrom cd9660 ro,noauto 0 0 /dev/ad0s1 /usr/home/mato/mnt/dos msdosfs ro,noauto 0 0 /dev/ad0s5 /usr/home/mato/mnt/fat msdosfs ro,noatime,noauto,-Lsk_SK.ISO8859-2 0 0 /dev/ad0s6 /usr/home/mato/mnt/win ntfs ro,noauto 0 0 /dev/ad0s7 /usr/home/mato/mnt/lin ext2fs ro,noauto 0 0 [mb-aw1n-bsd][mato][~] $ ll /dev/ad0 crw-r----- 1 root operator 0, 96 Feb 8 18:27 /dev/ad0 [mb-aw1n-bsd][mato][~] $ mount /usr/home/mato/mnt/win/ mount_ntfs: /dev/ad0s6: Operation not permitted [mb-aw1n-bsd][mato][~] $ mount /usr/home/mato/mnt/lin/ mount_ext2fs: /dev/ad0s7: Operation not permitted [mb-aw1n-bsd][mato][~] $ mount /usr/home/mato/mnt/fat/ mount_msdosfs: cannot find or load "msdosfs_iconv" kernel module mount_msdosfs: msdosfs_iconv: Operation not permitted [mb-aw1n-bsd][mato][~] $ mount /usr/home/mato/mnt/dos/ [mb-aw1n-bsd][mato][~] $ any hint pls ?? cheers, martin