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 1SX1sE-0007UK-IL for garchives@archives.gentoo.org; Wed, 23 May 2012 03:04:31 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2C015E0495 for ; Wed, 23 May 2012 03:04:30 +0000 (UTC) Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by pigeon.gentoo.org (Postfix) with ESMTP id 4141BE0507 for ; Wed, 23 May 2012 00:45:53 +0000 (UTC) Received: by wibhn14 with SMTP id hn14so3677649wib.10 for ; Tue, 22 May 2012 17:45:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:organization :x-mailer:mime-version:content-type:content-transfer-encoding; bh=HqDKBCEduxNnYNJnrVptDcGgYOHgcYEA478WK81HPCc=; b=JFxNQXO6kaCXTD8wNMBZAHSizvJJ8x2SMKiM4BqlXc+9EIhvHrQS0YeDe3dh/7WmaE eV16L/ZnwBGQmtP/73Ed/mCsLIey1Gg0Eco/dS8s+rxrgMEApUbpRTyr6m9uROsBqsTX Y9MAdweKVXMeMAJ1AsgIOXl45BYEsYdL4iGoAhObTd8RfQVZXRDtbtMD0nX3ONV9jFkV lZeaS5+naCTOsBEAsWYD6Un8pjyjMbOiRIH0AN7RNyX/r9cr/ONWuE1E0hW1Z5/odDb+ 6t7ZNSNL8FBTM0oYGbY6ZSB0JO0Wgor8Pqz68KY4lbzAlE05pAEx6mam/U+l2jY586oe qMvw== Received: by 10.180.82.5 with SMTP id e5mr39948960wiy.0.1337733953391; Tue, 22 May 2012 17:45:53 -0700 (PDT) Received: from khamul.example.com (196-215-114-166.dynamic.isadsl.co.za. [196.215.114.166]) by mx.google.com with ESMTPS id f19sm57522129wiw.11.2012.05.22.17.45.50 (version=SSLv3 cipher=OTHER); Tue, 22 May 2012 17:45:52 -0700 (PDT) Date: Wed, 23 May 2012 02:42:46 +0200 From: Alan McKinnon To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] OT: mount so that other users can write to mounted dir? Message-ID: <20120523024246.539347a1@khamul.example.com> In-Reply-To: <20120523002603.GA4469@waltdnes.org> References: <20120523002603.GA4469@waltdnes.org> Organization: Internet Solutions X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; x86_64-pc-linux-gnu) 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-Transfer-Encoding: 7bit X-Archives-Salt: 4cb27254-6f59-48c0-a5cf-1638cfc17c1b X-Archives-Hash: 995de730af54be0b83c5e3e4ed81ad71 On Tue, 22 May 2012 20:26:03 -0400 "Walter Dnes" wrote: > I'm not really a fan of automount, but I understand that lots of > people are. I'm trying to get it fully functional under mdev, and > then do a write-up on the wiki page. A Google search turns up lots of > examples of code. However, the examples are for embedded devices, and > they assume the only user is root. I've got the automounting and > autounmounting working. Everybody can read the mounted USB stick, but > only root can write. I've tried pmount with the umask option, but it > doesn't help. Assume the scrpt gets passed MDEV="sdb1" > > # > # Create the directory in /media > mkdir -p /media/${MDEV} > # > # Change permissions to allow read+write by all > chmod 777 /media/${MDEV} > # > # Mount the directory in /media > pmount --noatime --umask 000 /dev/${MDEV} > > But after the mount... > user2@aa1 /media $ ll > total 3 > drwxr-xr-x 3 root root 1024 May 22 19:02 . > drwxr-xr-x 19 root root 1024 May 21 20:41 .. > drwxr-xr-x 5 root root 1024 May 16 01:42 sdb1 > > Every directory and file belongs to user:group root:root. On the > USB stick all directories are 755 and files are 744. As a > heavy-handed ugly hack, I could... > > chgrp -R users /media/${MDEV} > chmod -R g+w /media/${MDEV} > > to a USB stick. I obviously don't wnt to do that on the external USB > drive that I rsync my system to every few weeks. Any ideas? And oh > yes, I do realize I'm trying to re-invent the wheel. The old one has > a broken udev :( > 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. -- Alan McKinnnon alan.mckinnon@gmail.com