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 1SHLNJ-0003gg-Cy for garchives@archives.gentoo.org; Mon, 09 Apr 2012 20:39:45 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B1804E0BC1; Mon, 9 Apr 2012 20:39:29 +0000 (UTC) Received: from mail-yx0-f181.google.com (mail-yx0-f181.google.com [209.85.213.181]) by pigeon.gentoo.org (Postfix) with ESMTP id BDA9FE0AF7 for ; Mon, 9 Apr 2012 20:38:00 +0000 (UTC) Received: by yenq2 with SMTP id q2so2566567yen.40 for ; Mon, 09 Apr 2012 13:38:00 -0700 (PDT) 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 :content-type:content-transfer-encoding; bh=6tTR8IpjGwgQuMdhWdJTb1AGYjzMF1rPAd9rlRQvXdM=; b=OCaH9XJYcHY3K29KMVJKriA8GLQLp0JHFyg4AG98CX+PtdLN6Fpisv0MMCud37+8we FLmX07aH82vT8K3xjUd5kecIg/zouMdGIKoKDLWPBy+CBkrL5G4VYymZlILImPvZ9Ftk IeBOGM7QRFKWa0K8ccd3WGgAzlstb5upI5xbmxxMJrgOikdkKqWRI4jsojhSneYFWoEE ciOdtWtS6cVS8gamKUy/8NXFyQ9xhgwxizgjyZGMIJCAQvuhTaMe1esWqrWmYp9RXOIL 9HHCpH4MYYxsDzjYW1MC68evIAa4Ouoksf32eX4KV8BJLey0x0vEOlJ/6R7k1v22VQXj h92A== 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 Received: by 10.236.153.70 with SMTP id e46mr7200061yhk.29.1334003880226; Mon, 09 Apr 2012 13:38:00 -0700 (PDT) Received: by 10.101.82.7 with HTTP; Mon, 9 Apr 2012 13:38:00 -0700 (PDT) In-Reply-To: References: Date: Mon, 9 Apr 2012 15:38:00 -0500 Message-ID: Subject: Re: [gentoo-user] User can mount/umount but not write to top the new drive From: =?UTF-8?B?Q2FuZWsgUGVsw6FleiBWYWxkw6lz?= To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: d7509ac7-2bca-46f2-a340-f07799fc1160 X-Archives-Hash: d65a20cc0efacca28cd84500b99f3071 On Mon, Apr 9, 2012 at 2:59 PM, Mark Knecht wrote: > Hi, > =C2=A0 This has long been a sort of hack area of me in terms of sys admin > at home - giving a user account access to the top of a new external > drive. I'd like to learn to do this right. Maybe someone can set me > straight about what root needs to do to make this work. > > =C2=A0 OK, so as root I partition & format the USB drive to get it ready, > and then I modify fstab with the following addition: > > c2stable ~ # cat /etc/fstab | grep VideoLib > LABEL=3DVideoLib =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/mnt/VideoLib =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 ext3 > auto,rw,users 0 0 > c2stable ~ # > > =C2=A0 Having done that, as well as making the /mnt/VideoLib mount point, > my user account can now mount & umount the drive: > > mark@c2stable ~ $ mount /mnt/VideoLib/ > mark@c2stable ~ $ df -h | grep VideoLib > /dev/sdf1 =C2=A0 =C2=A0 =C2=A0 458G =C2=A0199M =C2=A0435G =C2=A0 1% /mnt/= VideoLib > mark@c2stable ~ $ umount /mnt/VideoLib/ > mark@c2stable ~ $ df -h | grep VideoLib > mark@c2stable ~ $ > > =C2=A0 The problem is that at this point my user account cannot create a > new directory on that drive: > > mark@c2stable ~ $ mount /mnt/VideoLib/ > mark@c2stable ~ $ df -h | grep VideoLib > /dev/sdf1 =C2=A0 =C2=A0 =C2=A0 458G =C2=A0199M =C2=A0435G =C2=A0 1% /mnt/= VideoLib > mark@c2stable ~ $ mkdir /mnt/VideoLib/Video > mkdir: cannot create directory `/mnt/VideoLib/Video': Permission denied > mark@c2stable ~ $ > > =C2=A0 In the past I've gotten around this by having root mount the drive > and then change ownership to mark:users once it's mounted. Linux > remembers I've done that once and no longer requires me to do anything > else as root. > > =C2=A0 Is that truly required or is there a way to give the user access t= o > the top of the new mount point without roots' involvement? Have you tried: # cat /etc/fstab | grep VideoLib LABEL=3DVideoLib =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/mnt/VideoLib =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 ext3 auto,rw,users,uid=3DX,gid=3DY 0 0 where X is mark's user id, and Y is users' group id? On the other hand, do you use a desktop environment? Because GNOME does everything you want for you, and I suppose KDE does the same. Regards. --=20 Canek Pel=C3=A1ez Vald=C3=A9s Posgrado en Ciencia e Ingenier=C3=ADa de la Computaci=C3=B3n Universidad Nacional Aut=C3=B3noma de M=C3=A9xico