From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SXSiV-0003Xf-DR for garchives@archives.gentoo.org; Thu, 24 May 2012 07:44:15 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8C5C8E09D7; Thu, 24 May 2012 07:44:01 +0000 (UTC) Received: from ironport-out.teksavvy.com (ironport-out.teksavvy.com [206.248.143.162]) by pigeon.gentoo.org (Postfix) with ESMTP id B2D1FE07B7 for ; Thu, 24 May 2012 07:42:34 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgwKAG6Zu09sr+Ye/2dsb2JhbABEsnYDgRiBCIIVAQEEATocKAsLLQcBERQlN4gJBboJiwgCWIE4DII8YgONPodchV+IOoFYgwU X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="182165595" Received: from 108-175-230-30.dsl.teksavvy.com (HELO waltdnes.org) ([108.175.230.30]) by ironport2-out.teksavvy.com with SMTP; 24 May 2012 03:42:33 -0400 Received: by waltdnes.org (sSMTP sendmail emulation); Thu, 24 May 2012 03:41:35 -0400 From: "Walter Dnes" Date: Thu, 24 May 2012 03:41:35 -0400 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] OT: mount so that other users can write to mounted dir? Message-ID: <20120524074135.GB7210@waltdnes.org> References: <20120523002603.GA4469@waltdnes.org> <20120523024246.539347a1@khamul.example.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120523024246.539347a1@khamul.example.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Archives-Salt: 5417c9a0-c84b-4ead-a70e-5540b3b72a2f X-Archives-Hash: 01bbb31e6f4586516a4e327df59a47e7 On Wed, May 23, 2012 at 02:42:46AM +0200, Alan McKinnon wrote > What filesystem is on that stick? > > For vfat and ntfs what you are truing should work. > For Unix file systems (ext*, reiser, etc), it will not work. You cannot > override owners and permissions with the mount command on those. Thanks. That does make sense. I wouldn't want my regular user account to be able to do stuff to root's files on my external backup (reiserfs). Experimentation confirms that posix/linux filesystems mount with the mountpoint being user:root and group:root when mounted or pmounted by root. FAT32 etc mounts as user:root and group:plugdev. Making my user account a member of the plugdev group, and pmounting with umask 007 allows me to do whatever I want to files on the USB stick. So I guess FAT32 has its uses. One last sticking point is manual unmounting. You obviously want to unmount properly before disconnecting a USB key or drive, if you've done any writing to it. If the pmount is done as root, pumount or umount has to be done as root. What's the proper sudoers wildcard syntax for unmounting a mountpoint under /media? Does this look OK? waltdnes d531 = (root) NOPASSWD: /bin/umount /media/sd[a-z][1-9] -- Walter Dnes