LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-05-2009, 03:48 PM   #1
senseproof
Member
 
Registered: May 2009
Distribution: Fedora 10
Posts: 31
Blog Entries: 5

Rep: Reputation: 16
halevt cannot mount because of permissions


The halevt daemon starts itself as the user halevt. So when I put in my removable media I notice it tries to mount them (from /var/log/messages):

XXXXX localhost halevt: Running: halevt-mount -u /org/freedesktop/Hal/devices/XXXXX -o sync -m 002

But no device is mounted. If I make halevt daemon start as root then the devices mount like they should so the problem is that the halevt user does not have the right permission to mount devices. How can I give it that permission? Since these are removable medias I can't add specific permissions for each media, the halevt user must be able to mount/unmount any removable media entered.
 
Old 05-05-2009, 03:55 PM   #2
david1941
Member
 
Registered: May 2005
Location: St. Louis, MO
Distribution: CentOS7
Posts: 267

Rep: Reputation: 58
set it up in /etc/fstab and give it the users flag (see man fstab)
 
Old 05-05-2009, 04:12 PM   #3
senseproof
Member
 
Registered: May 2009
Distribution: Fedora 10
Posts: 31

Original Poster
Blog Entries: 5

Rep: Reputation: 16
david one of us has not understood the other. I cannot add the devices to /etc/fstab because I do not know what their UUID's will be. These are removable USB keys, sd cards, etc. I knew of the existance of the /etc/fstab file and read the man page before posting this question. Sorry if I am missing something obvious but it does not describe how to grant a user the rights to mount/unmount ANY unknown devices I have to know their UUID in advance, which defeats a good deal of the point of having halevt at all.

Is my only option to run the daemon as root?
 
Old 05-15-2009, 04:17 PM   #4
senseproof
Member
 
Registered: May 2009
Distribution: Fedora 10
Posts: 31

Original Poster
Blog Entries: 5

Rep: Reputation: 16
I have written a udev rule to do this. It will be published on sourceforge in a couple of days (when they approve the project) and you can install it if it is something you want too. This post will be updated with the URL.
 
Old 05-29-2009, 06:03 PM   #5
Ouiqui
LQ Newbie
 
Registered: May 2009
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by senseproof View Post
The halevt daemon starts itself as the user halevt. So when I put in my removable media I notice it tries to mount them (from /var/log/messages):

XXXXX localhost halevt: Running: halevt-mount -u /org/freedesktop/Hal/devices/XXXXX -o sync -m 002

But no device is mounted. If I make halevt daemon start as root then the devices mount like they should so the problem is that the halevt user does not have the right permission to mount devices. How can I give it that permission? Since these are removable medias I can't add specific permissions for each media, the halevt user must be able to mount/unmount any removable media entered.
Hello Senseproof,

To allow the user "halevt" to automount your removables, you should add this to your /etc/PolicyKit/PolicyKit.conf :
Code:
  <match action="org.freedesktop.hal.storage.mount-removable">
    <match user="halevt">
      <return result="yes"/>
    </match>
  </match>
(in between the <config></config> tags)

Then stop halevt daemon, restart hal, and start halevt.

I had the same problem and this fixed it.

(see http://hal.freedesktop.org/docs/Poli...it.conf.5.html)

Last edited by Ouiqui; 05-29-2009 at 06:05 PM. Reason: add link to policykit.conf
 
Old 11-20-2010, 11:06 AM   #6
Jeff91
Bodhi Developer
 
Registered: Jan 2009
Location: Bloomington, IL
Distribution: Bodhi
Posts: 379

Rep: Reputation: 68
Hate to bump an old thread - but do you know how to apply that PolicyKit rule to Ubuntu 10.04 where they no longer use /etc/PolicyKit/PolicyKit.conf?

~Jeff
 
  


Reply

Tags
automount



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mount permissions rubadub Fedora 2 02-11-2008 10:47 AM
mount permissions for hd* and sd* Vincent_Vega Linux - General 2 08-07-2006 02:30 PM
mount permissions chrismiceli Linux - General 1 06-13-2004 08:50 PM
mount permissions RTT Linux - Newbie 5 03-08-2004 11:13 AM
mount permissions aqoliveira Linux - General 2 01-12-2002 09:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration