From: Mark Knecht <markknecht@gmail.com>
To: Gentoo User <gentoo-user@lists.gentoo.org>
Subject: [gentoo-user] User can mount/umount but not write to top the new drive
Date: Mon, 9 Apr 2012 12:59:31 -0700 [thread overview]
Message-ID: <CAK2H+eddgVMBoVUFR0V8QA79y9eE_3hMcQDdAW-UwhyOY+mEdQ@mail.gmail.com> (raw)
Hi,
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.
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=VideoLib /mnt/VideoLib ext3
auto,rw,users 0 0
c2stable ~ #
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 458G 199M 435G 1% /mnt/VideoLib
mark@c2stable ~ $ umount /mnt/VideoLib/
mark@c2stable ~ $ df -h | grep VideoLib
mark@c2stable ~ $
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 458G 199M 435G 1% /mnt/VideoLib
mark@c2stable ~ $ mkdir /mnt/VideoLib/Video
mkdir: cannot create directory `/mnt/VideoLib/Video': Permission denied
mark@c2stable ~ $
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.
Is that truly required or is there a way to give the user access to
the top of the new mount point without roots' involvement?
Thanks,
Mark
next reply other threads:[~2012-04-09 20:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-09 19:59 Mark Knecht [this message]
2012-04-09 20:38 ` [gentoo-user] User can mount/umount but not write to top the new drive Canek Peláez Valdés
2012-04-09 21:22 ` Mark Knecht
2012-04-09 20:48 ` Neil Bothwick
2012-04-09 21:23 ` Mark Knecht
2012-04-09 21:39 ` Neil Bothwick
2012-04-09 21:42 ` Canek Peláez Valdés
2012-04-09 21:58 ` Mark Knecht
2012-04-09 22:45 ` Michael Mol
2012-04-10 11:18 ` Stroller
2012-04-10 11:55 ` Alan McKinnon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAK2H+eddgVMBoVUFR0V8QA79y9eE_3hMcQDdAW-UwhyOY+mEdQ@mail.gmail.com \
--to=markknecht@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox