From owner-freebsd-questions@FreeBSD.ORG Thu Feb 26 20:51:56 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 0618F731 for ; Thu, 26 Feb 2015 20:51:56 +0000 (UTC) Received: from mail-la0-x229.google.com (mail-la0-x229.google.com [IPv6:2a00:1450:4010:c03::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 71D6E3B2 for ; Thu, 26 Feb 2015 20:51:55 +0000 (UTC) Received: by lamq1 with SMTP id q1so13532983lam.5 for ; Thu, 26 Feb 2015 12:51:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=mxZrmgRMbV6QcHyd784VAfdaOUQHUwi/iczLsT6UgEw=; b=LUYlG5Kn7F1sqYDDklvRdDjDE+zEoNkeelNVbxgzHdZvoa8SZ9bYJCnHM1layRK4kZ pBQx37OU3+o+RpeSHAysv0UGdGf/tH8MhIOb7PsE2Uok/OaxGuo/TCYePw7H78+PQ4x0 yXJWwfIxO/0Hb4J+CeOHEv2lTgcpbppPOgOjUyfR4L1sCXPzRJ8esSMYIJQELKFuffgh mUens/Vm7pmQoIO2+/6BqZgDELy1IVkwf2K5wffSEEVnOKCavUpCzV5BBkcves44iLNG DkJ/sPvgFnA5Lk4F4F/ydlwDxChzLmAClC6XEoVEibnQj/C7vp96LqsldyTG9dacnx2n lozA== MIME-Version: 1.0 X-Received: by 10.112.167.4 with SMTP id zk4mr9185633lbb.74.1424983913370; Thu, 26 Feb 2015 12:51:53 -0800 (PST) Received: by 10.25.34.68 with HTTP; Thu, 26 Feb 2015 12:51:53 -0800 (PST) In-Reply-To: <54EF80C2.3040803@hiwaay.net> References: <54EF5A28.8010605@hiwaay.net> <20150226183930.477ed7b5.freebsd@edvax.de> <54EF601F.3070702@hiwaay.net> <20150226190921.94278d64.freebsd@edvax.de> <54EF80C2.3040803@hiwaay.net> Date: Thu, 26 Feb 2015 14:51:53 -0600 Message-ID: Subject: Re: problems mounting camera to download pics .... From: Andrew Gould To: "William A. Mahaffey III" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: FreeBSD Questions !!!! 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 20:51:56 -0000 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