Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
automount usb hard disk - proper priviledges
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
lukjel_op
n00b
n00b


Joined: 30 Oct 2004
Posts: 54

PostPosted: Tue Sep 05, 2006 9:14 pm    Post subject: automount usb hard disk - proper priviledges Reply with quote

Hi!

I read about it on the forum (not only this one) but still I can't solve my problem.
I have external hard drive with usb. I want all users can read it. I also want to connect flash-drives, cards readers etc. and I want to make them visible and at least readable for users.
My current situation is: gnome + gnome-volume-manager + hal.
This works perfectly for root user...
I don't want to set up mount-points in fstab file - I just want to change DEFAULT settings.
I know I can use fdi files and policy... but how?
This is my last try:
(file /etc/hal/fdi/policy/90userpolicy.fdi)
Code:

<deviceinfo version="0.2">
  <device>
    <match key="volume.fstype" string="ntfs">
      <append key="volume.mount.valid_options" type="strlist">umask=</append>
      <merge key="volume.mount_options" type="string">umask=0666</merge>
      <merge key="volume.mount_option" type="string">umask=0666</merge>
    </match>
  </device>
</deviceinfo>

It works - but still no effects (it works - hal-device shows these values in keys).
But it looks like my mounter doesn't care...

Please - any ideas?
Back to top
View user's profile Send private message
Gremo
Guru
Guru


Joined: 27 Feb 2006
Posts: 450

PostPosted: Wed Sep 06, 2006 5:22 am    Post subject: Reply with quote

have you got problems with ALL usb sticks or only with your usb hard drive (maybe ntfs?)?
Back to top
View user's profile Send private message
cconroy
Tux's lil' helper
Tux's lil' helper


Joined: 26 Apr 2005
Posts: 81

PostPosted: Wed Sep 06, 2006 2:50 pm    Post subject: Reply with quote

I'd like to see a good answer to this...I still have to hack up an fstab entry to get hal + gnome-volume-manager to actually mount something, and it's a pain in the ass. I've also got dead duplicate entries as a result of this (one for the fstab entry and one for what hal/udev create when the drive is actually mounted). everyone says not to use ivman becuase hal+udev+gnome-volume-manager should handle it, but the docs for hal rules are atrocious. the best I can do is hack up a udev rule to recognize my external and create an fstab entry for it. there has to be an easier way!!!!
Back to top
View user's profile Send private message
simkin
Apprentice
Apprentice


Joined: 25 Jun 2003
Posts: 164

PostPosted: Wed Sep 06, 2006 3:10 pm    Post subject: Reply with quote

edited()

Last edited by simkin on Mon Sep 25, 2006 10:53 pm; edited 1 time in total
Back to top
View user's profile Send private message
Gremo
Guru
Guru


Joined: 27 Feb 2006
Posts: 450

PostPosted: Wed Sep 06, 2006 3:19 pm    Post subject: Reply with quote

1) are you sure that hald and hotplug are in the default runlevel?
2) are you sure that your user is in plugdev and disk groups?

try also this (this will solve permissions problems with ntfs usb disks):
Code:

  # cd /usr/share/hal/fdi/policy/10osvendor/
  # touch 21-ntfs-permissio21.fdi

content of 21-ntfs-permissio21.fdi:
Code:

  <?xml version="1.0" encoding="ISO-8859-1"?>
  <deviceinfo version="0.2">
  <!-- Mount external ntfs drives with user privileges -->
    <device>
      <match key="block.is_volume" bool="true">
        <match key="volume.fsusage" string="filesystem">
          <match key="@block.storage_device:storage.no_partitions_hint" bool="false">
            <match key="volume.partition.msdos_part_table_type" exists="true">
              <match key="volume.partition.msdos_part_table_type" int="0x07">
                <merge key="volume.mount_option" type="string">umask=0222</merge>
              </match>
            </match>
          </match>
        </match>
      </match>
    </device>
  </deviceinfo>


and
Code:

# nano /usr/share/hal/scripts/hal-system-storage-mount


Just after the fi and before the commented echo (line 168), add the following line:
Code:

  fi
 
  MOUNTOPTIONS="$MOUNTOPTIONS,$HAL_PROP_VOLUME_MOUNT_OPTION" #line added
 
  # echo "options = '$MOUNTOPTIONS'"
Back to top
View user's profile Send private message
raylpc
Guru
Guru


Joined: 07 Aug 2003
Posts: 310
Location: Toronto, Canada

PostPosted: Sun Sep 24, 2006 9:18 pm    Post subject: Reply with quote

Thanks A LOT, Gremo! That fixed my problem right away.
Back to top
View user's profile Send private message
Gremo
Guru
Guru


Joined: 27 Feb 2006
Posts: 450

PostPosted: Sun Sep 24, 2006 10:11 pm    Post subject: Reply with quote

raylpc wrote:
Thanks A LOT, Gremo! That fixed my problem right away.


thanks to some men of fedora forums too! :wink:
however, for some strange reasons, now i cannot automount anything in kde :? check the thread above...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum