<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Andrew<br><br>Thank you for such an in depth and informative response. Changing the uid= to blank did the trick in the end.<br><br>Stu <br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Andrew Oakley <andrew@aoakley.com><br>To: British Ubuntu Talk <ubuntu-uk@lists.ubuntu.com><br>Sent: Friday, 8 February, 2008 11:25:18 AM<br>Subject: Re: [ubuntu-uk] USB Hard Drive Group Permissions<br><br>Stuart
Bird
wrote:<br>>
The
first
way
is
to
use:
gksudo
nautilus
to
access
and
edit
files
as <br>>
root.
The
second
way
is
to
add
myself
to
the
root
group
which
then <br>>
allows
me
full
control
from
my
normal
users
account.<br>> <br>>
Can
anyone
advise
if
these
are
viable
(ie
safe)
long
term
solutions
or <br>>
should
I
keep
searching
for
a
better
way.<br><br>Are
you
logged
into
Gnome
when
you
attach
the
external
drive,
or
do
you <br>have
it
plugged
in
when
you
switch
on?<br><br>If
you
have
it
plugged
in
when
you
switch
on,
it
won't
know
who
to
mount <br>it
as,
and
may
default
to
root;
you
may
need
to
write
an
/etc/fstab
rule <br>for
the
external
drive
with
uid=youruserid
and/or
gid=yourgroup
.
For <br>example,
my
username
is
aoakley,
so
to
mount
a
FAT
external
drive
at <br>boot
time,
I
might
write
an
/etc/fstab
rule
like:<br><br>/dev/sdb
/media/mymountpoint
vfat
rw,uid=aoakley
0
0<br><br>Beware
that
not
all
external
hard
drives
are
VFAT!
Some
may
be
NTFS
or <br>somesuch.<br><br>Alternatively
I
might
use
umask
to
make
it
read/writable
to
everyone <br>within
a
particular
group:<br><br>/dev/sdb
/media/mymountpoint
vfat
rw,umask=007
0
0<br><br>...which
would
make
it
read/writable
to
everyone
in
the
root
group,
or:<br><br>/dev/sdb
/media/mymountpoint
vfat
rw,gid=aoakley,umask=007
0
0<br><br>...which
would
make
it
read/writable
to
everyone
in
aoakley's
group,
or:<br><br>/dev/sdb
/media/mymountpoint
vfat
rw,umask=000
0
0<br><br>...which
would
make
it
owned
by
root
but
read/writable
to
everyone,
even <br>guest
users
(INSECURE!).<br><br>(Stop
reading
now
if
you
attach
the
drive
before
the
machine
is
switched <br>on,
or
if
you
always
leave
the
drive
plugged
in.
The
following
only <br>apply
if
you
attach
the
drive
AFTER
you
log
in
to
Gnome.)<br><br>Newly
plugged-in
USB
drives
AFTER
you
have
logged
in
to
Gnome
should <br>automatically
be
mounted
as
the
logged-in
user
(eg.
aoakley
for
myself) <br>and
root
as
the
group.<br><br>Have
you
got
more
than
one
user
logged
into
Gnome
perhaps?
This
might <br>cause
confusion.<br><br>For
example,
I
log
in
to
Gnome
and
insert
a
1GB
USB
key,
so
I
get:<br><br>$
cat
/etc/mtab<br>...<br>/dev/sdb
/media/AO\0401GB
vfat <br>rw,nosuid,nodev,shortname=mixed,uid=1000,utf8,umask=077,usefree
0
0<br>$
ls
-l
/media<br>total
28<br>drwx------
10
aoakley
root
16384
1970-01-01
01:00
AO
1GB<br>...<br><br>The
last
line
shows
that
the
user
is
aoakley
(my
local
logged-in
user) <br>and
the
group
is
root.<br><br>If
you
aren't
getting
this,
then
either
you're
not
using
Gnome <br>Automount,
or
something
is
wrong
with
Gnome
Automount.
Have
you
written <br>an
/etc/fstab
entry
which
is
overruling
Gnome
Automount?
If
so,
try <br>commenting
it
out.<br><br>Is
automount
running?
Check
for
gnome-v*
processes,
you
should
see
two; <br>gnome-volume-manager
and
gnome-vfs-daemon
.
If
not,
something
is
wrong <br>with
your
gnome
start-up
sequence
(too
complex
to
discuss
here).<br><br>$
sudo
ps
-e
|
grep
gnome-v<br>5600
?
00:00:00
gnome-volume-ma<br>5630
?
00:00:00
gnome-vfs-daemo<br><br>Check
your
Gnome
Automount
preferences
in
System
-
Preferences
- <br>Removable
Drives
And
Media
-
Removable
Storage
-
Mount
Removable
Drives <br>When
Hot
Plugged
TICKED
-
Mount
Removable
Media
When
Inserted
TICKED.<br><br>Check
your
Gnome
Automount
configuration
in
(Alt-F2)
-
gconf-editor
- <br>System
-
Storage
.
Check
that
there
is
NOT
some
special
rule
for
your <br>hard
drive.
Then
check
under
Default
Options
-
(Your
storage
type)
and <br>make
sure
that
the
uid=
config
is
either
not
present,
or
blank.<br><br>For
instance,
my
gconf-editor
-
System
-
Storage
-
Default
Options
- <br>VFat
-
mount_options
shows:<br><br>[shortname=mixed,uid=,utf8,umask=077,exec,usefree]<br><br>The
important
bit
there
is
"uid="
(uid
equals
empty)
which
defaults
to <br>the
currently
logged-in
user
in
Gnome.<br><br>-- <br>Andrew
Oakley<br><br><br>-- <br><a ymailto="mailto:ubuntu-uk@lists.ubuntu.com" href="mailto:ubuntu-uk@lists.ubuntu.com">ubuntu-uk@lists.ubuntu.com</a><br><a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk</a><br><a href="https://wiki.kubuntu.org/UKTeam/" target="_blank">https://wiki.kubuntu.org/UKTeam/</a><br></div><br></div></div><br>
<hr size=1>
Yahoo! Answers - Get better answers from someone who knows. <a
href="http://uk.answers.yahoo.com/;_ylc=X3oDMTEydmViNG02BF9TAzIxMTQ3MTcxOTAEc2VjA21haWwEc2xrA3RhZ2xpbmU">Try
it now</a>.</body></html>