From owner-freebsd-stable@FreeBSD.ORG Thu Feb 9 18:23:37 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 4AB7116A420 for ; Thu, 9 Feb 2006 18:23:37 +0000 (GMT) (envelope-from freebsd-stable@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8611D43D45 for ; Thu, 9 Feb 2006 18:23:36 +0000 (GMT) (envelope-from freebsd-stable@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1F7GRd-0004fm-Tt for freebsd-stable@freebsd.org; Thu, 09 Feb 2006 19:23:06 +0100 Received: from r5k4.chello.upc.cz ([86.49.10.4]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 Feb 2006 19:23:05 +0100 Received: from martinkov by r5k4.chello.upc.cz with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 Feb 2006 19:23:05 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-stable@freebsd.org From: martinko Date: Thu, 09 Feb 2006 19:22:33 +0100 Lines: 226 Message-ID: References: <200602082003.k18K3ZQJ077077@lurza.secnetix.de> <43EA6B21.8040307@pobox.sk> <43EA6E25.8090009@luna.afraid.org> <43EA70E8.2030301@pobox.sk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: r5k4.chello.upc.cz 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 In-Reply-To: <43EA70E8.2030301@pobox.sk> Sender: news 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: Thu, 09 Feb 2006 18:23:37 -0000 martinko wrote: > Raaf wrote: > > >>martinko wrote: >> >> >> >>>Jorge Aldana wrote: >>> >>> >>> >>>>Yea, your permissions are off, need rw on them as well. >>>> >>>>I caught this thread and the 3 steps do it nicely! You may need to >>>>logoff and back on to get the group change going for your username >>>>though, well I did. >>>> >>>>I caught the devfs setting but does anyone have one already set? It >>>>should go in the rc.conf under /etc (I just want a ruleset or need one >>>>if one is readily avaialble) >>>> >>>> >>>> >>>> >>>>>revfs_system_ruleset="mydevfsrules" >>>>> >>>>> >>>> >>>>Jorge >>>> >>>>On Wed, 8 Feb 2006, martinko wrote: >>>> >>>> >>>> >>>> >>>>>Oliver Fromme wrote: >>>>> >>>>> >>>>> >>>>> >>>>>>martinko wrote: >>>>>> >>>>>> >>>>>> >>>>>>>Oliver Fromme wrote: >>>>>>> >>>>>>> >>>>>>> >>>>>>>>martinko wrote: >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>>>Oliver Fromme wrote: >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>>>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). >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>>[...] >>>>>>>>>$ ll /dev/ad0 >>>>>>>>>crw-r----- 1 root operator 0, 96 Feb 8 18:27 /dev/ad0 >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>>Condition #2 isn't met: The device must be "rw" for for >>>>>>>>the user (in this case for the operator group). Note >>>>>>>>that "r" is not sufficient, even for read-only mounts. >>>>>>>> >>>>>>>> >>>>>>> >>>>>>>sure. but why did it mount /usr/home/mato/mnt/dos then ?? >>>>>>> >>>>>>> >>>>>> >>>>>>Maybe /dev/ad0s1 had different permissions? >>>>>> >>>>>> >>>>>> >>>>> >>>>>$ ls -la /dev/ad0* >>>>>crw-r----- 1 root operator 0, 96 Feb 8 18:27 /dev/ad0 >>>>>crw-r----- 1 root operator 0, 97 Feb 8 18:27 /dev/ad0s1 >>>>>crw-r----- 1 root operator 0, 98 Feb 8 18:27 /dev/ad0s2 >>>>>crw-r----- 1 root operator 0, 99 Feb 8 18:27 /dev/ad0s3 >>>>>crw-r----- 1 root operator 0, 101 Feb 8 19:27 /dev/ad0s3a >>>>>crw-r----- 1 root operator 0, 102 Feb 8 19:27 /dev/ad0s3b >>>>>crw-r----- 1 root operator 0, 103 Feb 8 18:27 /dev/ad0s3c >>>>>crw-r----- 1 root operator 0, 104 Feb 8 19:27 /dev/ad0s3d >>>>>crw-r----- 1 root operator 0, 105 Feb 8 19:27 /dev/ad0s3e >>>>>crw-r----- 1 root operator 0, 106 Feb 8 19:27 /dev/ad0s3f >>>>>crw-r----- 1 root operator 0, 100 Feb 8 18:27 /dev/ad0s4 >>>>>crw-r----- 1 root operator 0, 107 Feb 8 18:27 /dev/ad0s5 >>>>>crw-r----- 1 root operator 0, 108 Feb 8 18:27 /dev/ad0s6 >>>>>crw-r----- 1 root operator 0, 109 Feb 8 18:27 /dev/ad0s7 >>>>>crw-r----- 1 root operator 0, 110 Feb 8 18:27 /dev/ad0s8 >>>>> >>>>> >>>>> >>> >>>ok, once again and with the righteous permissions.. >>> >>> >>>[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-rw---- 1 root operator 0, 96 Feb 8 22:50 /dev/ad0 >>>crw-rw---- 1 root operator 0, 97 Feb 8 22:50 /dev/ad0s1 >>>crw-rw---- 1 root operator 0, 98 Feb 8 22:50 /dev/ad0s2 >>>crw-rw---- 1 root operator 0, 99 Feb 8 22:50 /dev/ad0s3 >>>crw-rw---- 1 root operator 0, 101 Feb 8 23:50 /dev/ad0s3a >>>crw-rw---- 1 root operator 0, 102 Feb 8 23:50 /dev/ad0s3b >>>crw-rw---- 1 root operator 0, 103 Feb 8 22:50 /dev/ad0s3c >>>crw-rw---- 1 root operator 0, 104 Feb 8 23:50 /dev/ad0s3d >>>crw-rw---- 1 root operator 0, 105 Feb 8 23:50 /dev/ad0s3e >>>crw-rw---- 1 root operator 0, 106 Feb 8 23:50 /dev/ad0s3f >>>crw-rw---- 1 root operator 0, 100 Feb 8 22:50 /dev/ad0s4 >>>crw-rw---- 1 root operator 0, 107 Feb 8 22:50 /dev/ad0s5 >>>crw-rw---- 1 root operator 0, 108 Feb 8 22:50 /dev/ad0s6 >>>crw-rw---- 1 root operator 0, 109 Feb 8 22:50 /dev/ad0s7 >>>crw-rw---- 1 root operator 0, 110 Feb 8 22:50 /dev/ad0s8 >>>[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][~] >>>$ >>> >>> >>>as you can see, the results are the same as before -- only the last >>>mount point got mounted. (why?) >>>permissions were set via /etc/devfs.conf and system rebooted: >>>perm ad0* 0660 >>> >>>any hint or idea what might be wrong pls ?? >>> >>> >>> >> >>My guess is that you haven't added support for those other >>filesystems in your kernel and it's trying to kldload those >>modules but fails because you are not root. >> >> >> >> >> >> >> > > > yeah, that sounds very reasonable (even though i would expect something > like that to happen somehow automagically) ... anyway, i'll have a look > at it tmrw or so.. thanks! > > m. confirmed. almost. all but one mounted. please see below and comment ... /everything setup as before/above/ [mb-aw1n-bsd][mato][~] $ mount /usr/home/mato/mnt/win/ [mb-aw1n-bsd][mato][~] $ mount /usr/home/mato/mnt/lin/ [mb-aw1n-bsd][mato][~] $ mount /usr/home/mato/mnt/fat/ mount_msdosfs: msdosfs_iconv: Operation not permitted [mb-aw1n-bsd][mato][~] $ mount /usr/home/mato/mnt/dos/ [mb-aw1n-bsd][mato][~] $ kldstat Id Refs Address Size Name 1 30 0xc0400000 459d90 kernel 3 1 0xc085c000 56c8 vesa.ko 4 1 0xc0862000 cbe4 ntfs.ko ... 13 1 0xc0943000 4ec8 atapicam.ko 14 1 0xc0948000 1e78 msdosfs_iconv.ko 15 2 0xc094a000 49f4 libiconv.ko 16 1 0xc094f000 103f4 ext2fs.ko [mb-aw1n-bsd][mato][~] $ all necessary modules seem to be loaded so why is it still failing ?? martin