Permissions for hal mounted drives

D. Hugh Redelmeier hugh-pmF8o41NoarQT0dZR+AlfA at public.gmane.org
Thu Jul 3 00:44:48 UTC 2008


| From: William Muriithi <william.muriithi-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org>

| When one insert a portable drive on a system running Redhat
| distributions,

Different versions do different things.  You might want to be more
specific.

| its automatically mounted by I think HAL. I have
| checked automount configurations and certain its not automount that is
| running this process. The problem is, no one can write to a drive
| mounted in this way other than root.

I just tried (on Fedora 9) with two devices:

- USB flash drive with two HFS+ (Mac) filesystems.
/dev/sdh2 on /media/Patchstick type hfsplus (rw,nosuid,nodev,uhelper=hal)
/dev/sdh1 on /media/Patchstick-root type hfsplus (rw,nosuid,nodev,uhelper=hal)

  + the FS roots were owned by root
drwxr-xr-x 1 root root 15 2008-02-15 13:13 Patchstick
drwxr-xr-x 1 root root 22 2007-04-18 02:57 Patchstick-root

  + nobody.nobody seemed to own files under root.  Probably that's
    really what the HFS+ filesystem said (dunno)
$ ls -l /media/Patchstick
drwxr-xr-x 1 nobody nobody  4 2007-04-17 18:42 installer.d
drwxr-xr-x 1 nobody nobody  4 2008-02-15 14:21 perian
drwxr-xr-x 1 nobody nobody 13 2008-02-15 14:30 ssh


- USB flash memory (MP3 player) with one VFAT filesystem:
/dev/sdh1 on /media/SAMSONG2 type vfat (rw,nosuid,nodev,uhelper=hal,shortname=lower,uid=104)


  + the root is still owned by hugh.root (with an odd date):
drwxr-xr-x 5 hugh root 16384 1969-12-31 19:00 /media/SAMSONG2

  + the things under the root are owned by hugh.root too.
    Remember that VFAT has no owner and group representation
    so those values are filled in from a arguments to mount.
$ ls -l /media/SAMSONG2
total 2784
drwxr-xr-x 2 hugh root   16384 2008-05-29 17:06 cbc
-rwxr-xr-x 1 hugh root 2801353 2007-07-28 02:37 p1050043.jpg
drwxr-xr-x 2 hugh root   16384 2002-12-27 17:44 system
drwxr-xr-x 2 hugh root   16384 2002-12-27 17:44 voice


Anyway, this whole area is surprisingly opaque to a long-time UNIX
user.  The lack of man pages is icing on the cake.

Maybe this has some hints: http://fedoraproject.org/wiki/Desktop/FastUserSwitching
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list