From owner-freebsd-questions@FreeBSD.ORG Thu Feb 26 21:44:33 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 953CFC21 for ; Thu, 26 Feb 2015 21:44:33 +0000 (UTC) Received: from fly.hiwaay.net (fly.hiwaay.net [216.180.54.1]) (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 4FAF9BF7 for ; Thu, 26 Feb 2015 21:44:32 +0000 (UTC) Received: from kabini1.local (rbn1-216-180-19-56.adsl.hiwaay.net [216.180.19.56]) (authenticated bits=0) by fly.hiwaay.net (8.13.8/8.13.8/fly) with ESMTP id t1QLiUUV024959 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Thu, 26 Feb 2015 15:44:30 -0600 Message-ID: <54EF9535.9020409@hiwaay.net> Date: Thu, 26 Feb 2015 15:50:45 -0600 From: "William A. Mahaffey III" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 CC: "FreeBSD Questions !!!!" Subject: Re: problems mounting camera to download pics .... References: <54EF5A28.8010605@hiwaay.net> <20150226183930.477ed7b5.freebsd@edvax.de> <54EF601F.3070702@hiwaay.net> <20150226190921.94278d64.freebsd@edvax.de> <54EF80C2.3040803@hiwaay.net> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Feb 2015 21:44:33 -0000 On 02/26/15 14:51, Andrew Gould wrote: > On Thu, Feb 26, 2015 at 2:23 PM, William A. Mahaffey III > > wrote: > > On 02/26/15 12:09, Polytropon wrote: > > On Thu, 26 Feb 2015 12:04:15 -0600, William A. Mahaffey III wrote: > > On 02/26/15 11:39, Polytropon wrote: > > On Thu, 26 Feb 2015 11:38:48 -0600, William A. > Mahaffey III wrote: > > .... I am trying to mount my digital camera to > download some pics I just > took. When I do this as root, it works AOK & I got > the pics off. > However, when I changed my fstab file to > (supposedly) allow regular > users to mount that directory, the mount command > fails: > > > [wam@kabini1, ~, 11:33:11am] 530 % mount /media/flash/ > mount_msdosfs: /dev/da0s1: Operation not permitted > [wam@kabini1, ~, 11:35:58am] 530 % > > And with "sudo" prefix? :-) > > [wam@kabini1, ~, 11:58:22am] 568 % mount /media/flash/ > mount_msdosfs: /dev/da0s1: Operation not permitted > [wam@kabini1, ~, 11:58:25am] 569 % sudo mount /media/flash/ > mount_msdosfs: /dev/da0s1: mount option is > unknown: Invalid argument > [wam@kabini1, ~, 11:58:27am] 570 % > > I didn't find the "users" option in "man mount" or "man > mount_msdosfs", > what is it supposed to do? What if you temporarily remove it? > > > A linuxism :-/ .... makes no difference either way, other than the > parsing error .... It's supposed to allow regular users to mount > that resource .... > > > > relevant lines from my fstab file: > > > /dev/da0s1 /media/flash msdosfs > rw,sync,noauto,longnames,-Lru_RU.UTF-8,users 0 > 0 > > Suggestion regarding msdosfs: add "-m=644,-M=755" to the > options to get rid of the fake +x attributes for the > files. > You could also add "noatime". > > Roger, wilco .... > > Not essential to solve the problem, but might be helpful for > further usage. > > > > Not a huge issue, since I can get 'er done as > root, but I don't see why > this shouldn't be feasible as a regular user .... > TIA & have a nice, > snowy (here) day ;-) .... > > Do you have the mandatory "vfs.usermount=1" in > /etc/sysctl.conf? > Also check the device permissions: User or group > requires rw for > the device and must own the mountpoint. > > .... & remember to change it in the command line as well, > done, still > the same problem .... my root dir: > > > [wam@kabini1, ~, 12:01:36pm] 570 % ll / > total 32890 > [...] > drwxr-xr-x 5 root wheel 512 Oct 26 08:01 media/ > [...] > So am I supposed to have /media group writable ? I did so > & same issue .... > > I think so. You can test this by temporarily chown'ing the > whole /media subtree to your user, and then run the command > as user (given that vfs.usermount is already set). > > You can find more info here (regarding user mount): > > https://www.freebsd.org/doc/handbook/usb-disks.html > > > Hmmmm .... this looks rather involved, I think I'll punt. I can > get stuff mounted by root, & I usually have a root window open, so > I'm OK as is. Thanks :-) .... > > -- > > William A. Mahaffey III > > ---------------------------------------------------------------------- > > > If you set the suid on mount and umount, users should be able to mount > and unmount devices. > > chmod u+s /sbin/*mount > > > Andrew OK, I'll try that & see, thanks :-) .... -- William A. Mahaffey III ---------------------------------------------------------------------- "The M1 Garand is without doubt the finest implement of war ever devised by man." -- Gen. George S. Patton Jr.