From owner-freebsd-questions@FreeBSD.ORG Sun Nov 21 05:47:24 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 072C416A4D0 for ; Sun, 21 Nov 2004 05:47:24 +0000 (GMT) Received: from ms-smtp-01-eri0.southeast.rr.com (ms-smtp-01-lbl.southeast.rr.com [24.25.9.100]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3AFB043D49 for ; Sun, 21 Nov 2004 05:47:23 +0000 (GMT) (envelope-from jason@ec.rr.com) Received: from [192.168.1.100] (cpe-065-184-201-054.ec.rr.com [65.184.201.54]) iAL5lKKj004392; Sun, 21 Nov 2004 00:47:20 -0500 (EST) Message-ID: <41A02C69.9040904@ec.rr.com> Date: Sun, 21 Nov 2004 00:49:29 -0500 From: jason User-Agent: Mozilla Thunderbird 0.8 (X11/20041025) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Graham Bentley References: <20041120110353.06e8ee1d.gbentley@uk2.net> In-Reply-To: <20041120110353.06e8ee1d.gbentley@uk2.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Symantec AntiVirus Scan Engine cc: freebsd-questions@freebsd.org Subject: Re: User CD Mount X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Nov 2004 05:47:24 -0000 Graham Bentley wrote: >Hi All, > >I am trying to get permission to mount CD's when logged in non root >Following the handbook advice I have :- > >As root set the sysctl variable vfs.usermount to 1. ># sysctl -w vfs.usermount=1 >Added the line vfs.usermount=1 to the file /etc/sysctl.conf > >Changed group perms on devs ># chgrp operator /dev/acd0 ># chgrp operator /dev/acd1 > >Changed access perms ># chmod 640 /dev/acd0 ># chmod 640 /dev/acd1 > >Changed group perms on the mount points ># chgrp operator /cdrom ># chgrp operator /cdrom1 > >Added myself to the operator group in /etc/group >operator:*:5:root,graham > >However non of this worked - I could still not mount as non root >even though I was in the operator group. > >Next I installed the sudo package and added my name to the list >of adminsitrators. Whilst this had the desired outcome I still wasnt >happy that I couldnt get this working without using sudo :( > >Finally I change the owner on the mount point to my username >and that worked fine (without sudo) > >However I still do not think I have done the right thing (being >a bit of a noob :) as I have noticed that when I have mounted >the cd, an ls reveals the ownership as root:wheel - when I unmount >it is back to graham:operator ? > >(gkrellm also always reports the devices as being busy even though >I specified exactly the same mount command that works from cl ) > >This probably highlights my lack of understanding of permissions >etc so I was wondering if anyone could guide me in the path >to enlightenment ? > >Thanks !!! >_______________________________________________ >freebsd-questions@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-questions >To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > > > If I am not mistaken, chgrp and chmod are not sticky on /dev stuff, you lose it on reboot for example. These must be set in a conf file to be permanent. Your user account has to own the mount point also, so but something like cd-rom or acd0 in the top level of your home dir for easy access. Here is what I do to use the cd as a non root user. I added a group called cd_access that could access and mount cd drives and made my self a group member. I set vfs.usermount=1 under sysctl.config. In devfs.conf I added : own /dev/acd0 root:cd_access perm /dev/acd0 0770